这种问题需要强行重新修改
密码
,
方法
如下:
/etc/init.d/mysql stop (service mysqld stop )
/usr/bin/mysqld_safe --skip-grant-tables
另外开个SSH连接
[root@localhost ~]# mysql
mysql>use mysql
mysql>update user set password=password("123456") where user="root";
mysql>flush privileges;
pkill -KILL -t pts/0 可将pts为0的**用户(之前 运行 mysqld_safe的用户窗口)强制踢出
正常启动 MySQL:/etc/init.d/mysql start (service mysqld start)
/etc/init.d/mysql stop (service mysqld stop )
/usr/bin/mysqld_safe --skip-grant-tables
另外开个SSH连接
[root@localhost ~]# mysql
mysql>use mysql
mysql>update user set password=password("123456") where user="root";
mysql>flush privileges;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password:123456
pkill -KILL -t pts/0 可将pts为0的**用户(之前 运行 mysqld_safe的用户窗口)强制踢出
正常启动 MySQL:/etc/init.d/mysql start (service mysqld start)