mysql - 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
但当然它已安装。
解决方案
推荐阅读
- javascript - Django JsonResponse 使用 JavaScript 在模板中显示而不刷新页面
- gitlab - Gitlab 跑步者不会杀死取消的工作
- java - 带有 OrderBy 和 MaxResult 的 CriteriaQuery 仅返回非 NULL 行
- java - 扩展生成器类
- java - 通过 Java 访问 Windows 文件属性详细信息,例如作者?
- xml - 如何使用 XSLT 将元素添加为属性
- qt - 如何访问随机中继器孩子的属性?
- javascript - javascript中的日期比较不起作用
- sql - 如果在表中找不到数据,则打印一条消息
- vue.js - 当我认为我这样做正确时,获取未定义的属性