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.

mysql databae connectoins no good

Discussion in 'General Discussion' started by Secret Agent, Jul 30, 2005.

  1. Secret Agent

    Secret Agent Guest

    I just did a restore of ALL accounts, many with mysql databases.

    None of the databases are connecting and so they are not working server wide but mysql server is up and running ok itself.

    I don't know where to start here

    I have old-passwords in my.cnf and compiled apache with system mysql as well, still no good.

    I tried (from another thread suggestion) upgrading ot EDGE, retrying to restore - no good. I'm back on CURRENT.

    I restarted mysql a few times, /scripts/mysqlup --force and still doesn't work

    /scripts/perlinstaller --force DBD::mysql
    still doesn't work

    any suggestions?
     
    #1 Secret Agent, Jul 30, 2005
    Last edited by a moderator: Jul 30, 2005
  2. Secret Agent

    Secret Agent Guest

    I already did that and I can get into mysql in ssh fine

    Its just a connection problem

    /var/lib/mysql all owned by mysql as well which is good
     
  3. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Try running service chkervd restart twice and then use the command mysql as root in SSH. Do you get an error or a mysql> prompt?
     
  4. Secret Agent

    Secret Agent Guest

    I reran /scripts/securetmp and that also did not fix it
     
  5. Secret Agent

    Secret Agent Guest

    Some example messages

    DATABASE CONNECTION COULD NOT BE INITIALIZED!
    ERROR: Could not select database. Please report this message to


    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/spirit/public_html/iwant/act.php on line 44


    No database selected


    Critical database error - Selecting Database
     
  6. Secret Agent

    Secret Agent Guest

    This is getting aggravating. Someone please help.

    It seems impossilble
     
  7. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    There are several reasons for this error..

    one is the case of the table name should be same .. like if their name is in lower case then it should be mentioned lower case in the php script...

    second one is, just add the missing '@' sign before the array line..

    Like @mysql_fetch_array(mysql_query("......"));
     
  8. Secret Agent

    Secret Agent Guest

    Please read my first post

    I did a restore of all accounts, that is all. Was always on 4.1 mysql.

    What else could there be to resolve this?
     
  9. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Give me a shout on AIM or MSN if you can. I'll have a look at the problem and see what the problem is.
     
  10. Secret Agent

    Secret Agent Guest

    I *think* the problem was that cpanel bug (again!) with restore. It did not reapply the db usernames per db as the restore would normally do.

    I noticed this globally.

    More cpanel bugs, yes.
     
  11. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    Is it fixed now? Could you tell us how you fixed it? (for future reference)
     
  12. DF-Duncan

    DF-Duncan Member

    Joined:
    Feb 15, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Did you ever find a fix for this ?
     
  13. Secret Agent

    Secret Agent Guest

    Read my last post carefully

    "It did not reapply the db usernames per db as the restore would normally do."

    What does that tell you? The fix is to re-apply the database users per database again.
     
Loading...

Share This Page