Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    4

    Default Can't select database

    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. #2
    Registered User
    Join Date
    Apr 2009
    Posts
    4

    Default

    yes...I have entered those as username_dbname, username_dbuser and PW (is username_ also needed for the password?

  3. #3
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by tomw View Post
    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?
    Are you using the full name of the database: username_dbname where username is your cPanel username?

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by tomw View Post
    yes...I have entered those as username_dbname, username_dbuser and PW (is username_ also needed for the password?
    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. #5
    Registered User
    Join Date
    Apr 2009
    Posts
    4

    Default

    The user I setup in the database has 'All Privileges'

  6. #6
    ckh
    ckh is online now
    Member
    Join Date
    Dec 2003
    Posts
    319

    Default

    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. #7
    Registered User
    Join Date
    Apr 2009
    Posts
    4

    Default

    Yes - the user I created is assigned to the DB. Also have deleted that user and recreated several times with no success.

  8. #8
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by tomw View Post
    Yes - the user I created is assigned to the DB. Also have deleted that user and recreated several times with no success.
    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. #9
    Registered User
    Join Date
    Apr 2009
    Location
    USA
    Posts
    1

    Default 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..

Similar Threads & Tags
Similar threads

  1. cpbackup User Select
    By Solokron in forum Data Protection
    Replies: 5
    Last Post: 06-04-2009, 12:43 AM
  2. Select only necessary information
    By vivekvsist in forum cPanel Developers
    Replies: 3
    Last Post: 03-28-2009, 03:08 PM
  3. give ads to select users or under a select user
    By kistler in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-28-2006, 07:00 AM
  4. Select or Not Select PHP SueExec Support, that's the question...
    By Hueznar in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 06-12-2004, 10:12 AM
  5. Why is there no select all on each column
    By Donna in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-26-2004, 06:24 PM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube