mysql 问题解决(一)
MySQL 5.7+ by default haves a Password validation system. In case if you don't want to go strictly with the policy and need to assign your own then just disable the password validation and restart mysqld process.
Edit my.cnf file :
vi /etc/my.cnf
in [mysqld]
validate-password=off
Save the file and then restart the process
sudo service mysqld restart
or
systemctl restart mysqld
and then change the Root Password using the following and follow the steps it won't throw exception for the Root Password.
mysql_secure_installation
or
/usr/bin/mysql_secure_installation
If you are doing installation for the first time and want to know the temporary password then use the following to find the first time password:
grep 'temporary password' /var/log/mysqld.log
Let me know your comments on the same, in the below comment box.