• hd198871

    (@hd198871)


    about install 7.1 wordpress……
    i am sure that i fill in the right db user name and s-code
    but……
    help!!thanks a lot!!!

Viewing 9 replies - 16 through 24 (of 24 total)
  • khmedia

    (@etdsbastar)

    @hd198871
    I finally managed to solve the issue by using the localhost IP-address “127.0.0.1” instead of ‘localhost’ for ‘DB_HOST’ in wp-config.php. Weird considering that this IP-address is mapped to localhost anyway…?

    Hope this helps.

    I couldn’t get u.

    I had the same problem on a local OSX 10.5.7 install with MySQL 5.0.67 and Apache 2.2. It was pretty clear that WordPress was at fault, because phpMyAdmin was working just fine in the same doc root using the same MySQL user.

    I had to change from “localhost” to “127.0.0.1” for “DB_HOST” in wp-config.php to get it to work. Sort of ridiculous, since I can actually access the site at https://localhost/wordpress/wp-admin/install.php after making this change. Given that “127.0.0.1” can’t fail as a substitute for “localhost”, it seems like wp-config-sample.php should be permanently changed to use the IP address rather than the hostname.

    Actually, my problem may be due to Snow Leopard and the fact that there are all sorts of quirks and issues with installs of packages intended for Leopard.

    I can get phpMyAdmin and a GUI MySQL manager to connect to the database via the socket method, but can’t connect via TCP to localhost, the hostname, or 127.0.0.1. So, since WordPress requires a host name, I can’t make it connect.

    I think I may clear the current install and compile MySQL from source. Also heard that the latest 5.4 beta worked nicely on Snow Leopard.

    Installed 5.4 beta and was able to get direct localhost connection via the GUI client, but not via WordPress. I tried both Localhost and 127.0.0.1 to no avail. Finally tried 127.0.0.1:3306. Voila, WordPress is up and running.

    I am having exactly the same problem connecting to my database. I’m running Snow Leopard with a custom build of the 64bit MySQL. I’ve a clean install of wordpress 2.8.4.

    I’ve configured the database. I can connect via the terminal and via sequel pro. All of the passwords work correctly. With sequel pro I’m connecting at localhost.

    I’ve tried setting the MySQL host name to:

    localhost
    localhost:/tmp/mysql.sock
    localhost:3306
    127.0.0.1
    127.0.0.1:3306

    None of which was to any avail. Help anyone?

    to anyone still having trouble: try a variety of options, these must vary with WP versions…

    when you’re dealing with this block in wp-config.php:
    define(‘DB_NAME’, ‘wordpress’); // The name of the database
    define(‘DB_USE’’, ‘root’); // Your MySQL username
    define(‘DB_PASSWORD’, ”); // …and password (Leave empty!)
    define(‘DB_HOST’, ‘localhost’); // Your MySQL hostname

    DB_NAME: you should change this (if you’re creating a local version of an online WP install, this is the same name you were given when you created the online version of the database, something like abc12345678901234).

    DB_USER: this seems to vary, some sites say use the username you chose when installing the online version, others say leave it as “root”; “root” is what finally worked for me.

    DB_PASSWORD: also seems to vary, one site said use your existing password from the online install, but most said leave it blank; leaving it blank worked for me.

    DB_HOST: another varying item, some say leave as “localhost”, others had to specify an IP Address (most often seen: 127.0.0.1).

    and last but not least, my version of WP (2.8.4) does NOT have a /wp-admin/install.php, mine is /wp-admin/install-helper.php, which, after running, just left me staring at a blank white page… i then manually went to /wp-admin and was greeted by a glorious log-in screen…

    hope this helps someone,
    Atg

    I’ve tried all of these things and still can’t get WP to work. Granted, I’m on an old version of the software and that could be part of the problem – perhaps it’s time to upgrade after all. I’ll try that and report back.

    Like gbulmash, I also had to supply the port in the hostname config and I’m also running snow leopard. ::anger:: ::rage::

    I have several blogs and they all connect and they all use the same database with different table prefix’s

    I have installed a fresh copy of 2.9.1 and I can’t connect and have even copied the the top part of the wp-config.php to no avail.

    totally bizarre

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.