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.

Can't select database

Discussion in 'General Discussion' started by tomw, Apr 28, 2009.

  1. tomw

    tomw Registered

    Joined:
    Apr 28, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I have setup a MySQL database for a PHP script. Having entered the dbname, username and PW into the script setup, the script's install routine fails to create the required tables in the database. The script developer sent a MySQL version-test routine that returns 'Can't select database'. The versions of MySQL and PHP running both exceed the stated requirements of the script.

    Any ideas where this failing?
     
  2. tomw

    tomw Registered

    Joined:
    Apr 28, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    yes...I have entered those as username_dbname, username_dbuser and PW (is username_ also needed for the password?
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Are you using the full name of the database: username_dbname where username is your cPanel username?
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Passwords do not require the username_ prefix.

    Does the database user you are using has privileges to that database? You can verify this by clicking on the "MySQL Databases" icon in the cPanel interface and then clicking on the username to see what privileges they have.
     
  5. tomw

    tomw Registered

    Joined:
    Apr 28, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    The user I setup in the database has 'All Privileges'
     
  6. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    Verify the user is assigned to the db. This is the most often skipped step when setting up a db.

    Another thing to try is delete the user and manually add the user again and then assign the user to the db. I've experienced problems with the wizard before.
     
  7. tomw

    tomw Registered

    Joined:
    Apr 28, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Yes - the user I created is assigned to the DB. Also have deleted that user and recreated several times with no success.
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You may want to have our technical analysts take a look at this as this seems very abnormal. You can contact our technical analysts at: http://tickets.cPanel.net/submit
     
  9. NancyD

    NancyD Registered

    Joined:
    Apr 30, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    USA
    response

    try to check the connection of the your database from the PHP script....their might me a problem between that I also experienced that kind of problem..:):)
     
Loading...

Share This Page