Ubuntu 忘记 phpMyAdmin 登录密码
关于phpMyAdmin
phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you still have the ability to directly execute any SQL statement.
0X00 找到my.cnf文件
登录ubuntu系统,找到文件:my.cnf,一般来说文件的位置为:/etc/mysql/my.cnf,如不存在,建议在系统直接查找locate my.cnf | grep cnf:
root@ubuntu:/# locate my.cnf | grep cnf
/etc/mysql/my.cnf
0x01 跳过
使用vim /etc/mysql/my.cnf在[mysqld]目录下加上一句skip-grant-tables,使用键盘ESC退出,然后输入wq保存!
[mysql

当忘记Ubuntu上phpMyAdmin的登录密码时,可以通过查找my.cnf文件,跳过后重新设置MySQL密码,重启服务并刷新权限来解决。详细步骤包括定位my.cnf文件,编辑配置文件,设置新密码,正常登录web页面,并在完成密码修改后恢复配置文件。

437

被折叠的 条评论
为什么被折叠?



