WordPress.org

Ready to get started?Download WordPress

Forums

Can't Select Database Error (5 posts)

  1. ljk73
    Member
    Posted 7 years ago #

    I installed WordPress in January for a new (first) blog on my website. It worked great.

    Today, I am trying to create another blog/database on the same server. Each blog has its own folder on the server, the files are kept separate. I am using the exact same download of WordPress that I used the first time.

    I CANNOT get past the error when I attempt to run install.php: "Can't select database".

    My new database contains two underscores (my_blog_name). Would that be a problem? I hope not because I am held to that by my web host. I have accessed the database and can create tables manually. I have checked the wp-config file incessantly and it is correct.

    What is going on!?!?!

  2. ljk73
    Member
    Posted 7 years ago #

    It never fails. EVERY TIME I post a problem on a forum I figure it out 30 seconds or so after posting.

    Anyway, it's working now. In the wpconfig file for the first blog the host is "localhost", but the second blog the host is the domain name. I made that change and everything magically worked.

    Thanks anyway.

  3. demoment
    Member
    Posted 7 years ago #

    Hi,
    First time user here,and i have the same problem, cant access to database. My host is "localhost" in the wp-conf. file and it just din work out. wonder why ? appreciate if anyone can help.

    thanks.

  4. MichaelH
    Member
    Posted 7 years ago #

    Usually in this situation you have the wrong settings in wp-config.php or your database server is down.

  5. Kathy Reid
    Member
    Posted 6 years ago #

    Hi there,

    Recently my hosting provider upgraded, and I had the same issue. Here is how it was resolved;

    • First, I checked that the username, password etc (and the table prefix, don't forget that if you're running multiple installations) were correct. They were.
    • Then, I went into the MySQL control panel in my hosting provider's controls (usually something like cPanel and deleted the database user (not the database).
    • I recreated the user (good idea to change the password for security purposes, don't forget to change it in the wp-config.php file) using the MySQL tools in the cPanel
    • The user was then associated with the database
    • Check DB and repair DB were then run over the database
    • And.... voila!

    My theory here is that during a hosting upgrade, something occurs which dissociates the DB users from the database, meaning the users have to be recreated and re-associated.

    hth,
    Kathy

Topic Closed

This topic has been closed to new replies.

About this Topic