How to find out the username and password for mysql database

前端 未结 7 1112
天命终不由人
天命终不由人 2020-12-07 20:25

I\'ve forgotten what I set as username and password for mysql database. How could I be able to find it out? I am using wamp server. I am a newbie in mysql

7条回答
  •  执笔经年
    2020-12-07 20:31

    Assuming that the user you are using in phpmyadmin has the necessary privileges, you can run this query to change the root password:

    UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
    FLUSH PRIVILEGES;
    

提交回复
热议问题