WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection (10 posts)

  1. simile35
    Member
    Posted 3 years ago #

    Trying to install and run on my computer. Using XAMPP

    Correct username, password, and hostname.

    In processes mysqld.exe is running so I have no idea what the problem is.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

  2. 2ninerniner2
    Member
    Posted 3 years ago #

    Is your hostname entered as localhost
    Is your username root
    Is the password empty (blank, not even a space!)
    Is the database name exactly as you created it?
    Are both Apache and MySQL running?

    NOTE: NONE of these are OPTIONS!!! The ONLY item on this list that YOU get to choose is the database name. They are TOTALLY DEPENDENT upon which local server you are using; the above values are SPECIFICALLY for XAMPP for Windows.

  3. secondv
    Member
    Posted 3 years ago #

    Have you checked the error log within XAMPP? The error log is normally found in /xampp/mysql/data/.

    Also, check to see if phpmyadmin is able to connect to MySQL: http://localhost/phpmyadmin (once XAMPP is running).

  4. simile35
    Member
    Posted 3 years ago #

    2ninerniner2

    hostname: localhost
    username: simile35
    password: ******
    database name: wordpress

    on my xampp control panel both apache and mysql are running.

    secondv

    I couldn't find an error log in mysql data but I found one in apache
    these are the errors that showed up.

    [Tue Aug 30 10:01:40 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/arm-manifests
    [Tue Aug 30 10:01:43 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/arm-manifests
    [Tue Aug 30 10:01:52 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/pki
    [Tue Aug 30 10:02:05 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/ThawteTimestampingCA.crl, referer: app:/StageManager-2.5.swf
    [Tue Aug 30 10:02:08 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/ResourceCentralAtomPub_v1, referer: app://C:/Program Files (x86)/Common Files/Adobe/CS5.5ServiceManager/extensions/MYMESSAGES/ResourceCentral.swf?extID=com.adobe.rc.mymessages&appID=PPRO
    [Tue Aug 30 10:02:29 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/webfeed
    [Tue Aug 30 10:05:30 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/favicon.ico
    [Tue Aug 30 10:05:30 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/favicon.ico
    [Tue Aug 30 10:05:30 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/favicon.ico

  5. 2ninerniner2
    Member
    Posted 3 years ago #

    @simile35 - did you not read the NOTE section? :)

    What I gave you for values are NOT OPTIONS!!! What you have entered for Username and Password WILL NOT WORK! :) ... well, they CAN be but ONLY if you set up this user and password IN ADVANCE with phpMyAdmin (which I am going to assume you didn't :)

    Once again, for all those reading this having DB connection issues, the DEFAULT VALUES for XAMPP for Windows "out of the box" are:

    - Hostname = localhost
    - Username = root
    - Password = empty (blank, not even a space!)
    - Database name = exactly as YOU created it?

    *** THESE ARE NOT OPTIONAL VALUES!!! They MUST be entered EXACTLY as stated ***

  6. secondv
    Member
    Posted 3 years ago #

    The username for MySQL on XAMPP is root by default, and the MySQL password is blank. If you did not change these, then you may want to try those values.

  7. simile35
    Member
    Posted 3 years ago #

    Actually I did go into phpmyadmin and add the user simile.

    I tried the root account and the same things happened. I got this message "alright sparky you're ready..." and then back to the connection error page.

  8. simile35
    Member
    Posted 3 years ago #

    All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to…

    click run install.

    connection error

  9. simile35
    Member
    Posted 3 years ago #

    resolved.

    For some reason the install form wasn't writing to the config file. When I manually edited the config file it worked perfectly.

    Thanks for the help.

  10. blockbot
    Member
    Posted 2 years ago #

    The config issue used to happen to me a lot until I realized I needed to set the permissions on the directory that has the WP install to read/write. All XAMPP directories are set to read only unless you change it. If you are on a mac right click > get info > set privelages to read/write > click the gear icon > apply to enclosed items. That should prevent that problem in the future.

Topic Closed

This topic has been closed to new replies.

About this Topic