• Hi All,

    I just downloaded the latest version of WordPress and want to install it on XAMPP, i tweaked the wp-config.php file but when i want to install it i got this message:

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

    Are you sure it exists?
    Does the user ‘root’ have permission to use the ‘wordpress’ database?
    On some systems the name of your database is prefixed with your username, so it would be like username_‘wordpress’. Could that be the problem?

    Thank you for your help.

    A.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Have you completed the other necessary steps before this?

    Have you created the database? Is MYSQL turned on in XAMPP?

    Thread Starter Monsieur37

    (@monsieur37)

    Yes i did all the steps, created the database, and MYSQL and Apache are running in XAMPP.

    I don’t know what i missed :/

    Thread Starter Monsieur37

    (@monsieur37)

    I am on Mac OSX, if that can helps.

    Can you confirm what the name of the WordPress database and user is in PHPMyAdmin? To make sure you have not missed something…

    Thread Starter Monsieur37

    (@monsieur37)

    i named the database ‘wordpress’ and the user is ‘root’.

    Thread Starter Monsieur37

    (@monsieur37)

    I also set MySQL connection collation to “utf8_unicode_ci”, is that ok ?

    Have you checked manually in PHPMyAdmin? Just in case it is something else? Need to rule it out. It may be something like word_wordpress

    > I also set MySQL connection collation to “utf8_unicode_ci”, is that ok ?

    I’m not sure, personally I would leave everything at default that you can, less experimenting the better.

    Thread Starter Monsieur37

    (@monsieur37)

    https://postimg.org/image/qjw0fspjh/

    I can see here that my database is named wordpress and the user is root, i don’t know any other way to check it :/ Sorry i am very new to that, thanks for your help and patience.

    From your error message, it has to be a problem with the database name…

    Can you paste the line you are using wp-config?

    Thread Starter Monsieur37

    (@monsieur37)

    Yes, here it is:

    // ** MySQL settings – You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘wordpress’);

    /** MySQL database username */
    define(‘DB_USER’, ‘root’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ”);

    Whem i try to access localhost/wordpress from my browser i got this:

    Error establishing a database connection

    Thread Starter Monsieur37

    (@monsieur37)

    Ive found that in the forum :

    Ok, this thread was completely un-helpful. If you want the answer to the “error establishing database connection” problem on Mac OS X, here it is:

    The problem is that using localhost has PHP try to connect using a socket at /var/mysql/mysql.sock (which is not where it is on OS X).

    The easiest way to fix this is to use host 127.0.0.1

    Hope that helps.

    might be this? but i didn’t get it.

    Boom! I have it I think.

    It looks like you are using curly quotation marks…

    ‘wordpress’);

    ‘root’);

    Change to:

    ‘wordpress’);

    ‘root’);

    Thread Starter Monsieur37

    (@monsieur37)

    Man.. it’s working!

    Thank you for your help and patience ??

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Can't select database’ is closed to new replies.