(在root用户下进行)
1. # gedit /etc/my.cnf
在[mysqld]的段中加如下语句
[mysqld]
skip-name-resolve
skip-grant-tables
2. 重新启动mysql
# /etc/init.d/mysql restart
3. 登录并修改MySQL的root密码
# /usr/bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 3.23.56