centos 下修改mysql 密码

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h centos-svr password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
原文地址:https://www.cnblogs.com/inteliot/p/2495501.html