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
保存!