This article is for Site Manager accounts, find out what service you are using here.
If you change the MySQL root password via the /etc/my.cnf file and not through the Site Manager >> Install & Manage page, you may run into issues with other applications being able to access MySQL. You may also crash MySQL entirely.
Correctly Updating the MySQL Password
- Open the Site Manager.
- Click Site Applications.
- Click on the Edit icon next to MySQL.
- Click Next on the screen that pops up.
- Type in the desired password. Click Finish.
Repairing the MySQL Password
If you run into this situation, the following should help you update your MySQL password correctly to get things working. You will need working knowledge of command line or use the commands tool through Site Manager >> File Manager to follow this guide.
The error that you will usually see in regard to this issue is:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Here are the steps to follow, the commands are highlighted in gray:
- Get the mysql process command with: ps auxww
- Get the current root password. head /etc/my.cnf
- Kill mysql (nicely). kill ‘pid of mysql’
- Use the string shown in the ps auxww output to start mysql again. Add "–skip-grant-tables &" to the end of it.
An example would be [it should ALL be on one line]:
/usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/yourdomain.net.err --open-files-limit=800 --pid-file=/var/lib/mysql/yourdomain.net.pid --socket=/var/lib/mysql/mysql.sock --port=3306 --skip-grant-tables &
- Get into mysql. mysql
- Select the mysql database. use mysql;
- Reset the root password by running the following replacing theirpassword with the current root password found in step 2.
UPDATE user SET password = OLD_PASSWORD('theirpassword') WHERE user = 'root';
- Exit mysql. Ctrl+D
- Restart mysqld. /etc/init.d/mysqld restart
From there MySQL should be running. Contact Support with any further questions.