Can’t select database

Today I created a new Database for a development website. I used cPanel and then went to "MySQL Databases", created the DB. Next I backed up the main site DB. Now I modified the SQL backup to have the correct DB name and site URL. I then imported the modified backup with "PHP My Admin."

When I went to the wordpress admin for my site I see the following:

Can’t select database

We were able to connect to the database server (which means your username and password is okay) but not able to select the unaux_20269004_255_dev database.

    Are you sure it exists?
    Does the user 20269004_1 have permission to use the unaux_20269004_255_dev database?
    On some systems the name of your database is prefixed with your username, so it would be like username_unaux_20269004_255_dev. Could that be the problem?

If you don’t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

Any clue how I can change the permissions to be able to access this DB? As you can see the user can connect to the server but, it can't select the DB.
Do I have to create a new DB to resolve this? If I do what steps do I need to follow?

Site Dev Site Admin
DB_NAME: unaux_20269004_255_dev

Thanks,
Rap

Comments

  • Rapitharian@hotmail.com
    edited November -1

    badbot that is incorrect.
    Today I found the cause of my problem and a work around.
    The cause is every-time you create a new DB it creates a new username and random password. I don't know how to find this information when the DB is manually created. I will post it if/when I find where it is stored.
    The work around was to:
    1) Delete the manually created DB and the wordpress install.
    2) Use softaculous to reinstall wordpress and create a new DB.
    3) In softaculous go to installations
    4) Choose the pencil to edit you site.
    5) On the edit page you will find your db username and random password.

    Now I could copy the live site DB to this DB and begin making the needed modifications.