How to change the mysql root password

后端 未结 10 1443
误落风尘
误落风尘 2020-11-30 08:56

I have installed MySQL server 5 on redhat linux. I can\'t login as root so I can\'t change the root password.

mysql -u root -p  
Enter password:  

        
10条回答
  •  孤街浪徒
    2020-11-30 09:28

    According to the docs, in MySQL 5.7 the temp password gets put in /var/log/mysqld, but this is evidently not the case in 5.6.

    With MySQL version 5.6 installed on RHEL 6.7, I finally found the temporary root password set during install was placed in the file /root/.mysql_secret.

提交回复
热议问题