The MySQL server is currently offline Cpanel

How to disable cPHulk from the command line?
January 30, 2022
The server cannot process the image. This can happen if the server is busy or does not have enough resources to complete the task. Uploading a smaller image may help. Suggested maximum size is 2560 pixels.
February 1, 2022

The MySQL server is currently offline Cpanel

Error

The MySQL server is currently offline.

Error while connecting to MySQL: #28000Access denied for user 'root'@'localhost' (using password: YES)

Go to WHM > Service Manager and uncheck monitor for MySQL (so it doesn’t restart while fixing the issue), then save the area

2. Stop MySQL in root SSH (if it is running, if not running at all, then this can be skipped)

Code:

/etc/init.d/mysql stop

3. Start MySQL without the password prompt

Code:

mysqld_safe --skip-grant-tables &

4. Get a copy of the current MySQL root password

Code:

cat /root/.my.cnf

Copy down what it shows for the password.

5. Log into mysql command line in root SSH and reset the password

Code:

mysql -u root
\u mysql
update user set password=("NEW-ROOT-PASSWORD") where User='root';
flush privileges;
quit

Please replace NEW-ROOT-PASSWORD above with the actual password copied from /root/.my.cnf earlier.

6. Restart MySQL and check it’s working

Code:

/etc/init.d/mysql start
mysqladmin proc

If you can get a return of the processlist, it’s working (not to mention it would have started properly at that point to show it’s working).

7. Re-enable monitoring in WHM

Back in WHM > Service Manager, re-check monitor box for MySQL and save the area.

Comments are closed.

%d bloggers like this: