How to find out the MySQL root password

后端 未结 17 2514
野趣味
野趣味 2020-11-29 15:29

I cannot figure out my MySQL root password; how can I find this out? Is there any file where this password is stored?

I am following this link but I do not have dir

17条回答
  •  心在旅途
    2020-11-29 16:12

    MySQL 5.7 and above saves root in MySQL log file.

    Please try this:

    sudo grep 'temporary password' /var/log/mysqld.log
    

提交回复
热议问题