• Resolved zettaichan

    (@zettaichan)


    Hi,

    I’m trying to set up WordPress on my site, signalstation.com (in a subdirectory, ‘signal’.) But for a package with such a famously easy installation, it’s been a real pain for me.

    I finally got the MySQL stuff whipped into shape, but when I tried to go to the install page, I got this error.

    ——
    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.

    * 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?
    ——

    I asked my host, and ‘localhost’ is correct. The database server is running– I can access everything through phpAdmin.

    Here’s my wp_config.php file:

    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘signal_wp’); // The name of the database
    define(‘DB_USER’, ‘signal_station’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘******’); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix = ‘ss_’; // example: ‘wp_’ or ‘b2’ or ‘mylogin_’

    ——

    The signal_station user has all privileges.

    Is it causing a problem to change that table_prefix value? I’m probably going to want multiple blogs in time.

    I hope someone can help. This is really frustrating. Thanks for your time.


    AJS

Viewing 11 replies - 1 through 11 (of 11 total)
  • finally got the MySQL stuff whipped into shape

    If you could be more specific about this… Like: was the DB created by the host or by you? What kind of user interface do you have (cpanel, plesk, other)?
    Did you check this page in Codex?
    http://codex.wordpress.org/Installing_WordPress

    Thread Starter zettaichan

    (@zettaichan)

    I created the database.

    My UI is CPanel.

    I was consulting that page in Codex the entire time as I attempted to install WP.

    Thanks for your time.

    Usually this is the step cPanel users tend skip:
    http://codex.wordpress.org/Using_cPanel#Add_User

    Some hosts have a prefix that must be attached to the database and user names, could it be something like that?

    Whatever your user name is for your web hosting account is usually prepended to whatever database name and user name you wish to create.

    For example, if your web host login is “myblog”, your path is:

    /home/myblog/public_html/path/to/wordpress

    [Whatever is between home and public_html is your username and that is usually what needs to preceed your user and database names.]

    Therefore, if you wanted to create a database called station, and a user called signal, you’d create the database “station” first, which cPanel would name:

    myblog_station

    Then create the user “signal”, which cPanel would name:

    myblog_signal

    HTH.

    Thread Starter zettaichan

    (@zettaichan)

    I believe I covered all the step. Here’s a screenshot of how my database user info looks in CPanel.

    <img src=”http://i2.photobucket.com/albums/y7/zettaichan/cpanelmysql.gif&#8221; alt=”Image hosted by Photobucket.com”>
    http://i2.photobucket.com/albums/y7/zettaichan/cpanelmysql.gif

    If you see a discrepancy from my wp-config.php info please do point it out.

    Here’s my wp_config.php file:

    ——
    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘signal_wp’); // The name of the database
    define(‘DB_USER’, ‘signal_station’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘******’); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
    ——

    Thanks for your time.

    The only thing I can think of is that you mistyped the user password the first time you typed it. I’d go in and delete the user signal_station and recreate it, carefully typing the password. (Believe it or not, that has happened to me and I make my living typing; go figure!)

    Good luck!

    Thread Starter zettaichan

    (@zettaichan)

    I did recheck my password. I copied and pasted the password into phpAdmin to change the MySQL password, and then pasted the same exact password into my wp-config.php file. I could visually see that they were exactly the same.

    Thanks for your time.

    This is a longshot, but if you are using Firefox, you may need to clear your browser’s cache. Then close, and reopen, the browser. Then see if you can load WP.

    Thread Starter zettaichan

    (@zettaichan)

    Thanks for the advice. I tried that and I still got the same error.

    I had high hopes for WP because it was supposed to be easy to install. Very disappointing to have so much trouble, but the people here have certainly been helpful and I appreciate that.

    Thanks for your time.

    Thread Starter zettaichan

    (@zettaichan)

    I deleted the first database that I created and made another database and a new user to add to the database. After changing my config file accordingly, WP began to work.

    I have no idea what caused the problem or why that solved it. Thanks to everyone who gave their time and advice.

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