标签:
具体操作步骤:
关闭mysql:
1 # service mysqld stop
1 # (sudo) mysqld_safe --skip-grant-tables
启动mysql:
1 # service mysqld start 2 # mysql -u root 3 mysql> use mysql 4 mysql> UPDATE user SET Password=PASSWORD(‘xxx‘) WHERE user=‘root‘; 5 mysql> flush privileges; 6 mysql>\q
mysql> UPDATE mysql.user SET Grant_priv=‘Y‘, Super_priv=‘Y‘ WHERE User=‘root‘; mysql> FLUSH PRIVILEGES; mysql> GRANT ALL ON *.* TO ‘root‘@‘localhost‘;
标签:
原文地址:http://www.cnblogs.com/edisongz/p/4227599.html