• I am using WAMP – with an Apache server version 2.2.22 and associated MySQL and PHP. Running on Windows XP. When using FireFox to browse to “localhost/wordpress/wp-admin/install.php I get the following message –

    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    The “index.php” in the localhost root directory executes correctly. Both “MySQL Workbench and My SQL Buddy connect properly as does SQL console. Of course there are no tables in it since “install” has not executed. wp-config.php is set exactly like MySQL Workbench is but browser access is no good. I tried it with FireFox, Chrome, IE* and Safari.
    PHPmyAdmin no longer connects eithe, even though it did when I created the database.

    Any help greatly appreciated. I have 8 hours invested already. I can’t include access since it is on a local computer server.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Verify the MySQL the port number?

    Check the Apache log files, see if you can find something.

    Thread Starter desty2

    (@desty2)

    My MySQL port is 3306y and the Apache log shows no problems. This is confirmed by the fact that html files execute properly as well as PHP scripts that don’t need access to a MySQL database. Now add the fact that both MySQL workbench and sqlbuddy access the database OK, it would seem that a config file somewhere is not telling my WordPress site the correct information, The WP-Config file shows the same db name and user and password that the MySQL workbench is using. Any other thoughts?

    Personally never had any problems using WAMP for years in different computers. It’s indeed weird. You might want to try your luck at

    https://forum.wampserver.com/

    change your database address with the IP address of the database and advice the problem still exists..??

    Thread Starter desty2

    (@desty2)

    Thanks to those who responded. I got it after reading your replies and additional testing. Apparently both MySQL Workbench and sqlbuddy connect using root as user and when I created the database the user and password I specified were not set.
    When I plugged in user – root and no password it connects fine. Now I can go back and add a valid use and set passwords.
    Thanks for the help!

    high!

    i am a amateur at site making…..

    My employ had an offer from dnhost of free 7mb space. So we decide to make a website (simple, 1-2 pages)
    I used WordPress. And after i uploaded it to the server, they called me and said that they don’t support databases.
    Is there a way to convert my data to a no – database… something???
    sorry for my English..
    Thank you in advance!

    Sorry – no. That’s not possible.

    @desty2

    Glad it’s all sorted out, have a nice day!

    @libris mortis

    You have use a simple CMS that doesn’t use database, something like

    https://get-simple.info/

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘can't connect to database’ is closed to new replies.