The MySQL server is currently offline. Mysql::initcache() failed: The mysql server is offline.

I was getting below error while accessing MySQL Databases from cPanel though MySQL service was running on server -
The MySQL server is currently offline.
Mysql::initcache() failed: The mysql server is offline.

Solution :-

1. Restart MySQL on server -

WHM >>Restart Services >> SQL Server (MySQL) >> Are you sure you wish to restart this service? >> Yes
OR
service mysql restart
OR
/etc/init.d/mysqld start

2. Reset MySQL root password - ( It's stored in '/root/.my.cnf', which cPanel updates when you change the password.)

1. Stop the MySQL running on server - service mysql stop
2. Start the MySQL without password - mysqld_safe --skip-grant-tables &
3. Connect to MySQL server as the root user - mysql -u root
4. Now reset new password for MySQL's root user -
mysql> use mysql;
mysql> update user set password=PASSWORD("New_Root_-Password") where User='root';
mysql> flush privileges;
mysql> quit
5. Stop and restart the MySQL service.

Let me know if you've any thoughts.

Was this answer helpful?

 Print this Article

Also Read

How to Re-arrange accounts in WHM?

Please go through the following steps on How to Re-arrange accounts in WHM 1. Go to WHM and...

How to renew the cPanel license on your server?

Quickest way to renew cPanel license - First, you may check if the server has valid license for...

How to get backup data recursively from the Amazon server?

There may be a situation where you do not have a zip utility on Amazon server so, the backup...

How to Install cPanel on CentOS 6 or 7?

How to install cPanel on CentOS 6 or 7.  Please note cPanel does not support any other operating...

Install PHP-SSH2 extension in cPanel

PHP SSH2 extension to be loaded into the cPanel server as this module is not available inside...

Powered by WHMCompleteSolution