首页 > 解决方案 > Bitnami 服务器:重置 MySQL 根密码

问题描述

我不记得我在 Linuy-Mint 的“Bitnami WordPress Stack”(wordpress-5.4.2-0)中使用的 MySQL 根密码,并尝试了此处描述的步骤:

https://docs.bitnami.com/installer/apps/wordpress/administration/change-reset-password/

明确:

nano installdir/mysql/tmp/mysql-init

并将其保存为:

ALTER USER 'root'@'127.0.0.1' IDENTIFIED BY 'NEW_PASSWORD';

然后我通过 Bitname App installdir/ manager-linux-x64.run 重新启动 MySQL 服务器

我希望能够:

http://127.0.0.1:8080/phpmyadmin/index.php

使用用户 root 和 NEW_PASSWORD 但得到以下错误消息:

mysqli::real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)

这种方式与以下建议不同:Bitnami。重置 mysql 根密码

我也试过:

~/wordpress-5.4.2-0/mysql$ service mysql reset-password
mysql: unrecognized service

~/wordpress-5.4.2-0/mysql$ sudo dpkg-reconfigure mysql-server-xx

并在 phpmyadmin 中得到相同的错误。

如果我使用:

sudo /usr/bin/mysqld_safe --skip-grant-tables & mysql -h localhost

它得到了

Command 'mysql' not found, but can be installed

但当然它已安装。

标签: mysqllinuxbitnami

解决方案


推荐阅读