The initial password of mysql can be viewed in the log. The specific method is: first log in to mysql; then execute the [grep 'temporary password' /var/log/mysqld.log] statement.
How to view the initial password:
(Recommended tutorial: mysql tutorial)
Start mysql
systemctl start mysqld
View mysql status
systemctl status mysqld
Log in to the database
mysql -u root -p
After starting mysql, the initial password will be written to the log
Use the following command View
grep 'temporary password' /var/log/mysqld.log
Related recommendations: php training
The above is the detailed content of Where can I find the initial password of mysql?. For more information, please follow other related articles on the PHP Chinese website!