Failed to connect to mysql database using 'localhost' Print

  • cpanel, database, shared hosting
  • 0

Issue:

  • 1. Failed to connect to mysql database.
  • 2. Cannot connect to MySQL database after successfully import database from other server.


Reason:

We have setup our database server a little bit different compare to other hosting provider where each of these server will have a dedicated MySQL database server. This is to make sure we are able to optimize the performance of our web server. Combining both database server and web server in one server is good, However it has a drawback  where it could cause utilization race condition where MySQL will utilize all the memory and CPU especially when there websites are being attack. This will leave the web server stuck in high I/O wait and could end up not able to response to client request.

Solution:

Each of our server has been setup and design to have a dedicated database server. Please refer our KB Where can i find the correct database server for my cPanel account.


Was this answer helpful?

« Back