标签:
insert into user(host,user) values(‘%‘,‘root‘);
上一步不起作用的话(登录MySQL之后):
GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘1234‘ WITH GRANT OPTION;
service mysqld stop mysqld_safe --user=root --skip-grant-tables mysql -u root use mysql update user set password=password("new_pass") where user="root"; flush privileges;
卸载MySQL
yum --releasever=6 remove mysql* 查看残留:whereis mysql 删除mysql目录:rm –rf /usr/lib64/mysql 删除相关文件:rm –rf /usr/my.cnf rm -rf /root/.mysql_sercret rm -rf /var/lib/mysql
标签:
原文地址:http://my.oschina.net/muyexia/blog/404974