先將mysql 關閉
[root@centos ~]# service mysqld stop
Stopping mysqld: [ OK ]
[root@centos ~]#
[root@centos ~]# mysqld_safe --skip-grant-tables &
Starting mysqld daemon with databases from /var/lib/mysql
[root@centos ~]# mysql -u root
mysql> use mysql;
mysql> UPDATE user SET Password=PASSWORD("password") WHERE User='root';
mysql> flush privileges;
mysql> quit
沒有留言:
張貼留言