gpt4 book ai didi

mysql - 安装过程中phpmyadmin错误1064(42000)

转载 作者:行者123 更新时间:2023-12-04 14:22:11 24 4
gpt4 key购买 nike

在已经安装和配置了 MySQL 的 Debian 服务器上安装 phpmyadmin 时,我对一个错误感到很困惑。我已经尝试清除最新的 phpmyadmin 失败安装,但我无法安装它。

我也已经搜索了常见问题,如尝试将 phpmyadmin 文件修复为 https://serverfault.com/questions/341116/setting-up-phpmyadmin-got-a-mysql-syntax-error但是每个 timestamp 调用在没有值的情况下都是正确的( timestamp(value) 似乎是错误的)。

如果有人能帮助我,我将不胜感激!

错误说:

An error occurred while installing the database: 


│ mysql said: ERROR 1064 (42000) at line 1: You have an error in your SQL
│ syntax; check the manual that corresponds to your MySQL server version
│ for the right syntax to use near 'IDENTIFIED BY
│ 'hereismypassword'' at line 1 . Your options are:
│ * abort - Causes the operation to fail; you will need to downgrade,
│ reinstall, reconfigure this package, or otherwise manually intervene
│ to continue using it. This will usually also impact your ability to
│ install other packages until the installation failure is resolved.
│ * retry - Prompts once more with all the configuration questions
│ (including ones you may have missed due to the debconf priority
│ setting) and makes another attempt at performing the operation.
│ * retry (skip questions) - Immediately attempts the operation again,

│ <Ok>

最佳答案

如果您正在使用或升级到 MySQL 8,默认的 Authentication Plugin 是 caching_sha2_password

编辑/etc/mysql/my.cnf/etc/mysql/mysql.conf.d/mysqld.cnf

[mysqld]下添加以下行

default-authentication-plugin=mysql_native_password

然后重启mysql服务并连接到你的MySQL

service mysql restart 

mysql -u root -p

然后执行以下命令并将'password'替换为'你的root密码'

ALTER USER user IDENTIFIED WITH caching_sha2_password BY 'password';

FLUSH PRIVILEGES;

来源dev.mysql.com

关于mysql - 安装过程中phpmyadmin错误1064(42000),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53238275/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com