时间:2021-07-01 10:21:17 帮助过:18人阅读
查看服务器版本:
cat /etc/redhat-release
查看mysql 版本:
mysql -u root -p
use mysql;
###mysql 5.7以上。。
update user SET authentication_string = PASSWORD(‘newpassword‘) WHERE user = ‘root‘;
###mysql 5.7一下旧版本
update user SET password = PASSWORD(‘newpassword‘) WHERE user = ‘root‘;
flush privileges;
exit;
可以重启下mysql服务
centos6.5 : mysql mysqld restart
centos7 : systemctl restart mysqld
centos mysql 修改mysql用户密码
标签:log com res etc tar image ima centos6.5 art