The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Continual mySQL Error

Discussion in 'General Discussion' started by mark1hos, Nov 21, 2005.

  1. mark1hos

    mark1hos Active Member

    Joined:
    Jun 18, 2003
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Somerset, UK
    Warning: mysql_connect(): Access denied for user: 'dbname_dbname@localhost' (Using password: YES) in /home/username/public_html/includes/functions/database.php on line 19
    Unable to connect to database server!

    mySQL is up and running - this has been confirmed by a server technician. It restarts, no errors etc.

    However, the sites on this server using mySQL db's are not working!

    Can any one suggest anything to fix it?

    I have exhausted all routes that I know of.
     
  2. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Have you recently upgraded mysql to 4.1 or higher. I recall something about a passwords problem when going from 4.0x to 4.1x or higher.
     
  3. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    If you upgraded to v4.1.x and have a problem, check out MySQL web site: http://dev.mysql.com/doc/refman/4.1/en/upgrade.html
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Well, the first thngs to check if you have indeed upgraded MySQL to 4.1 are that you followed the instructions in WHM, i.e.:

    Rebuilt apache+php
    Force updated the Bundle::DBD::mysql perl module

    And as nyjimbo intimated, try enabling the old_password option in WHM > Tweak Settings.

    If none of that helps, or you didn't upgrade, check your mysql directory permissions and ownership which should normally be:

    chmod 751 /var/lib/mysql
    chown -R mysql:mysql /var/lib/mysql
     
  5. mark1hos

    mark1hos Active Member

    Joined:
    Jun 18, 2003
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Somerset, UK
    No, mySQL had not been upgraded to 4.1.

    I have performed the above and it still does not work.
     
  6. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Since you don't mention what routes, I'll start with a dead simple cause that has not been mentioned yet:

    Could it simply be the case that the password as used by the relevant PHP script is wrong?
     
  7. mark1hos

    mark1hos Active Member

    Joined:
    Jun 18, 2003
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Somerset, UK
    Apologies for not being more clearer. This is happening across all accounts on this server.
     
  8. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Well; make sure that your username and password are right in the script.
    Can you access MySQL at the prompt?
    Can you create users in the MySQL database?
     
  9. hpgoodboy

    hpgoodboy Registered

    Joined:
    Dec 30, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I had exactly the same problem.

    After lots of trial and error, I finally found that I did not grant any permissions
    to the user. After granting proper permissions in WHM, it seems to work fine.
     
  10. rusel

    rusel BANNED

    Joined:
    Aug 1, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Poland
    What did you exacly type? Coz I`ve got the same problem :((((
     
  11. maximus_marcus

    maximus_marcus Well-Known Member

    Joined:
    Mar 9, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Hello ,

    Are you able to connect to the database from the shell prompt using the username and password as

    mysql -u username -ppassword

    Try granting privileges to the database for the username and password.

    Regards,
    Marcus
    The New Phase Of Support
     
Loading...

Share This Page