由于 MySQL 用户密码,PHPMyAdmin 配置无法正常工作?

PHPMyAdmin Configuration not working because of MySQL user password?

Whosebug 社区,您好!

当我尝试在我的 debian 服务器上安装并配置我的 phpmyadmin 时,我总是收到此错误消息。

ERROR 1064 (42000): 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 'debian123'' at line 1

here a screenshot of it

我正在使用:debian 版本:9MySql版本:8.0.19

我尝试了什么:

我希望你能帮助我解决我的问题,因为我已经为此苦苦挣扎了一段时间。

提前谢谢你

~HTL_Krems_Engineer

这是更新版本 MySQL 的变化。

您不能再使用 grant x on y.z to username identified by 'debian123'

您必须拆分用户创建 into multiple steps.

您的 MySQL 应该如下所示:

mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'root';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;

听起来您可能安装了较旧的 phpMyAdmin,这可能会发生,因为默认情况下 backports 存储库固定为 100。您必须使用 apt-get -t stretch-backports install phpmyadmin 之类的命令强制更新版本安装。

Stretch 随 phpMyAdmin 4.6.6 一起提供,也许 post-install 脚本(您附上的屏幕截图)不知道为最近的 MySQL 版本创建用户的新语法.向后移植版本是 4.9.5,这更适合较新的 MySQL 变体。

另一种解决方法是对询问您是否希望包管理器创建 phpMyAdmin 数据库的问题回答“否”,然后根本不使用高级功能或 manually create the controluser and linked tables