Install MySQL : yum -y install mysql-community-server
use cat or vi /var/log/mysqld.log check mysql auto generate password
15.login mysql use :mysql -u root -p
16.change defualt password: set password for root@localhost = password(‘Your@pwd123‘);
17.If you forget password ,you can user select command find it;
18.About password : if the service error log no temp password ,you must be edit /etc/my.cnf .
19. vim /etc/my.cnf
20.skip-grant-tablesAsystemctl restart mysqld
原文:https://www.cnblogs.com/danyenine/p/15181710.html