The reason is MySQL v 5.7 or higher generates a temporary random password after installation and stored that in mysql error log file, located at /var/log/mysqld.log for an installation by the MySQL Yum repository on CentOS 7. It doesn’t use empty root password for mysql as previous version does, how to revert to old fashion, pls refer to below: Check what’s random password it generated when installing: # sudo grep 'temporary password' /var/log/mysqld.

Read More…