Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    1

    Default Unable to connect to database

    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. #2
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    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.
    Andy Reed
    RHCE and CCNA
    ServerTune.com

Similar Threads & Tags
Similar threads

  1. Replies: 6
    Last Post: 12-21-2010, 12:19 PM
  2. Replies: 12
    Last Post: 01-06-2010, 08:54 PM
  3. help Unable to connect
    By Crust in forum New User Questions
    Replies: 6
    Last Post: 07-23-2007, 02:54 PM
  4. FTP - Unable to connect
    By chrille112 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-28-2006, 08:15 AM
  5. Unable to connect
    By Beowulf in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 07-12-2003, 11:01 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube