Can not login to mysql 5.7.9 after change password

前端 未结 3 874
一向
一向 2020-12-29 00:22

I have installed Mysql Ver 14.14 Distrib 5.7.9, for Linux (x86_64) using EditLine wrapper On CentOS Linux release 7.1.1503

I Chang

3条回答
  •  执笔经年
    2020-12-29 01:18

    Use the below Steps to reset the password.

    $ sudo systemctl start mysqld
    

    Reset the MySql server root password.

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

    Output Something like-:

         10.744785Z 1 [Note] A temporary password is generated for root@localhost: o!5y,oJGALQa
    

    Use the above password during reset mysql_secure_installation process.

       $ sudo mysql_secure_installation
           Securing the MySQL server deployment.
    
           Enter password for user root: 
    

    You have successfully reset the root password of MySql Server. Use the below command to check the mysql server connecting or not.

    $ mysql -u root -p
    

    See my article: Install Latest MySQL 5.7 on RHEL/Centos 7

提交回复
热议问题