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.

Unable to connect to database

Discussion in 'Database Discussions' started by sony, Apr 8, 2005.

  1. sony

    sony Registered

    Joined:
    Mar 13, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    this is the error i get when i try to look at my website.( www.killcrazedgaming.com )
    it has been working for about a month and last nigh it screwed up. im renting from a hosting company and this is what mysql looks like,


    MySQL Account Maintenance


    Databases: killcra_a
    Users in a
    killcra_ (Privileges: ALL PRIVILEGES)

    Connection Strings
    Perl $dbh = DBI->connect("DBI:mysql:killcra_a:localhost","killcra_","<PASSWORD HERE>");
    PHP $dbh=mysql_connect ("localhost", "killcra_", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ("killcra_a");


    killcra_phpb1
    Users in phpb1
    killcra_ (Privileges: ALL PRIVILEGES)

    Connection Strings
    Perl $dbh = DBI->connect("DBI:mysql:killcra_phpb1:localhost","killcra_","<PASSWORD HERE>");
    PHP $dbh=mysql_connect ("localhost", "killcra_", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ("killcra_phpb1");



    phpmyadmin says i have no privledges for adding databases also. i have no clue whats wrong,anyone have any ideas ?
     
  2. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    There are couple of reasons why this might happen, it could be:

    1) mySQL database or user does not exist

    2) mySQL server is offline

    3) mySQL Host is incorrect

    4) The user specified does not have permission to access the database

    The best way is to contact your host and ask for help.
     
Loading...

Share This Page