1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Database Error: Unable to connect to the database:Could not connect to MySQL

Discussion in 'Database Discussions' started by bleustreak1, Mar 5, 2009.

  1. bleustreak1

    bleustreak1 New Member

    Joined:
    Mar 5, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I am getting this error while trying to access the site and and even while trying to log into administrator.

    Database Error: Unable to connect to the database:Could not connect to MySQL

    I have tried refreshing and accessing it a dozen times.
    The last thing I did was 2 days before when I changed the sites articles after which it was working fine for 2 days then suddenly I am getting this problem.


    I have searched the net and have found a solution which says that after restarting mysql in CPANEL the problem should be gone.

    I do not know the process of restarting the mysql service.


    can somebody please help me to restart mysql.
    And if anybody knows the solution to the my problem can they suggest me another method of solving(Database Error: Unable to connect to the database:Could not connect to MySQL) this problem.
     
  2. JPC-Shaun

    JPC-Shaun Member

    Joined:
    Oct 29, 2008
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Hi;

    You can start/stop the mysql service on the server by logging into the server as root from the command line interface and run the following command/s.

    service mysql stop
    service mysql start
    service mysql restart

    You can also use the following if the above does not work fine.

    /etc/init.d/mysql start
    /etc/init.d/mysql stop
     
  3. johntampi

    johntampi New Member

    Joined:
    Nov 19, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Mysql must have stopped functioning in the server. You can restart mysql using the command,

    /scripts/restartsrv mysql

    OR

    /etc/init.d/mysql restart
     
  4. nilesh_kolte

    nilesh_kolte Member

    Joined:
    Apr 13, 2006
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    Try to connect your database using the login details which you have provided in your config file. seems to be the config get mismatch.
     
  5. don_will

    don_will Member

    Joined:
    Jun 26, 2007
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cpanel
    remember database name and username and password when you created database using mysqldatabase through cpanel.. what scripts/cms e.t.c did you install.. check the config file to match your database,username,pass, e.t.c
     
  6. mrfuad2007

    mrfuad2007 New Member

    Joined:
    Dec 21, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    i am getting this message...

    Database Error: Unable to connect to the database:Could not connect to MySQL

    i talked with the hostmonster live help ...he said that we only allow 15 database connections...

    My website is actually a study website http://vuzs.net and at exams days our site's number of page impression increases...and mostly i felt this problem comes at exams days...

    please help me whats wrong and how can i fix that?
     
    #6 mrfuad2007, Dec 21, 2010
    Last edited: Dec 21, 2010
  7. twhiting9275

    twhiting9275 Member

    Joined:
    Sep 26, 2002
    Messages:
    373
    Likes Received:
    0
    Trophy Points:
    16
    this is a problem you need to take up with hostmonster. They need to either up your database connections (not likely), or you need to move to a higher grade account. 15 consecutive database connections at one time isn't really horrible though, if you close your connections properly.

    cPanel can't help with individual host issues
     

Share This Page