修改mysql配置文件
在/etc/my.cnf文件中加入一行代码skip-grant-tables
service mysqld start
mysql输入 flush privileges;
mysql输入 set password for root@localhost=password('123456');
mysql输入 quit
service mysqld stop
在/etc/my.inf文件中删除代码skip-grant-tables
service mysqld start
在/etc/my.cnf文件中加入一行代码skip-grant-tables
service mysqld start
mysql输入 flush privileges;
mysql输入 set password for root@localhost=password('123456');
mysql输入 quit
service mysqld stop
在/etc/my.inf文件中删除代码skip-grant-tables
service mysqld start