1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Changing MySQL password

Discussion in 'Plesk 9.x for Windows Issue, Fixes, How-To' started by Plesk_kidv, Feb 18, 2012.

  1. Plesk_kidv

    Plesk_kidv Guest

    0
     
    Hello,

    Can someone please tell me how to change the MySQL database password without having the old password. Need to connect Plesk to the local MySQL server but the password I have is incorrect.

    thanks for your help
     
  2. Plesk_kidv

    Plesk_kidv Guest

    0
     
    I figured it out . In case anyone needs this

    Step 1. Go to C:\Program Files\Parallels\Plesk\Databases\MySQL\Data\my.ini and add the following line: skip-grant-tables (this will let you access MySQL with no password)

    Step 2. Restart MySQL

    Step 3. Open CMD and change to the directory C:\Program Files\Parallels\Plesk\Databases\MySQL\bin\

    Step 4. Go into the MySQL command utility:

    mysql -u root mysql

    Step 5. Change the password using these two commands

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

    (New_Pass_Word is the new password you would like to use. If the root user doesn't work when updating the password in plesk try changing the user from 'root' to 'admin' in the command above)

    Step 6. Restart mysql

    Step 7. Go into Plesk and update the MySQL password to the changed

    Step 8. Remove the line 'skip-grant-tables' from the my.ini file and restart mysql
     
    Last edited by a moderator: Feb 19, 2012
Loading...