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.

No MYSQL / Database?

Discussion in 'General Discussion' started by chriscoxie, Oct 8, 2007.

  1. chriscoxie

    chriscoxie Member

    Joined:
    Oct 8, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello!

    My Hosting company says that CP are currently updating their control panel software, which means my PHP Database / MySQL stuff isn't working... I'm just getting messages such as

    Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/nowt2do/public_html/core/connect.php on line 10

    When I log into the C Panel X my Database is no longer in the MySql section... and I get the following listings

    Operating system Linux
    Service Status Click to View
    Kernel version 2.4.20-31.9smp
    Machine Type i686
    Apache version 1.3.39 (Unix)
    PERL version 5.8.4
    Path to PERL /usr/bin/perl
    Path to sendmail /usr/sbin/sendmail
    Installed Perl Modules Click to View
    PHP version 5.2.4
    MySQL version unknown
    cPanel Build 11.15.0-CURRENT 17483
    Theme cPanel X v2.6.0
    Documentation Click to View
    cPanel Pro 1.0 (RC1)




    Anyone know what's going on?
     
  2. sarhosting

    sarhosting Well-Known Member

    Joined:
    Oct 1, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Twitter:
    This could be due to permissions.

    In the list on the left under "databases" does it say 0/0 ?? if so then your Hosting Company need to tweak permissions for MYSQL and allow access to your cPanel account.

    Its pretty easy via command line.

    I hope this helps.
     
  3. chriscoxie

    chriscoxie Member

    Joined:
    Oct 8, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    The list on the left says

    MySQL Databases 1 / unlimited

    Then in the MYSQL Databases page I get

    MySQL Account Maintenance



    --------------------------------------------------------------------------------

    Current Databases:
    nowt2do_nowt2do
    Users in nowt2do
    nowt2do_nowt2do (Privileges: ALL PRIVILEGES)

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

    sarhosting Well-Known Member

    Joined:
    Oct 1, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Twitter:
    I know its possibly stupid but you have got PHP setup with MYSQL?
     
  5. chriscoxie

    chriscoxie Member

    Joined:
    Oct 8, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Yep it's all set up, I can see the database there, but just keep getting this message

    connecting
    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nowt2do'@'localhost' (using password: NO) in /home/nowt2do/public_html/core/connect.php on line 3

    selecting db
    Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'nowt2do'@'localhost' (using password: NO) in /home/nowt2do/public_html/core/connect.php on line 10

    Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/nowt2do/public_html/core/connect.php on line 10


    very random!
     
  6. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    I wouldn't go messing with your code. Any differences in errors most likely means they (your host) is working on it. I have had this problem in the past and managed to get mysql back up in a few minutes ..but every server is different. I wish they had not blamed this on cPanel. They should be able to get mySQL back up regardless of what version cPanel they just installed or updated to. I say they *should* ..if it's been more than an hour and based on your "point the finger" response you seem to have gotten from them ..I think you may be in the wrong boat if uptime is important to you and your site(s). good luck with this. I know how it feels.
     
  7. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    they need to update PERL on that box.
     
  8. chriscoxie

    chriscoxie Member

    Joined:
    Oct 8, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    over a week of this now and there's still no good! Hosting company say it's CPanels fault, but looks like they've done something wrong with the software to me.
     
  9. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Unless its a known specific issue that Cpanel hasnt fixed yet this should not be happening. If your host is simply updating mysql it should be minutes or hours to fix, maybe a day at worst. Ask them what exactly is wrong and if they dont give you some details then maybe you should consider moving your hosting somewhere else. If they handle a simple issue like mysql updates this badly what will they do with a real problem?
     
  10. chriscoxie

    chriscoxie Member

    Joined:
    Oct 8, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    very true, thanks for your responses. They've reinstalled mysql, and he problem seems to be the database is looking for a password which is non-existant. The worry of course with moving hosting, is moving all the stuff from their server as that's foolishly is the only place where the database exists!
     
  11. Voltar

    Voltar Well-Known Member

    Joined:
    Apr 30, 2007
    Messages:
    269
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bakersfield, California
    You can create a "full backup" in cPanel and it'll include your database. Also if your new host has cPanel also, they can import that backup of your account to get everything back up and running, including the database.
     
  12. sarhosting

    sarhosting Well-Known Member

    Joined:
    Oct 1, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Twitter:
    This is true and also we can do a full account transfer:

    All you need is

    Shared IP
    Username
    password
    domain
     
  13. S-Combs

    S-Combs Well-Known Member

    Joined:
    Jun 10, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    That message is stating there is a problem with your scripts' configuration.

    Open the database configuration file for that script and recheck that the connection information is correct. The message above shows that it is not processing the correct username or password. .


    It should be similar to below

    PHP:
     $HOST='localhost';
     
    $DATABASE_NAME='nowt2do_nowt2do';
     
    $DATABASE_USER='nowt2do_nowt2do';
     
    $DATABASE_USER_PASSWORD='??????????????';
     
Loading...

Share This Page