WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress and MYSQL 5 (6 posts)

  1. dotchan
    Member
    Posted 4 years ago #

    My server has recommended that I change all of my databases over to MYSQL 5. So I have, and now there's a shiny new database called "username_database" instead of the old "database" (not the actual names, obv, just using them as an example).

    However, when I try to change the Config file to pull from this new database, it keeps giving me a "cannot connect to database" error.

    My current config file, with some of the information changed for security's sake:

    $db_servertype = "mysql";
    $db_host = "localhost";
    $db_name = "database";
    $db_user = "user";
    $db_password = "password";
    
    $table_prefix = "4images_";

    The information on my new DB server host is as follows (with the username changed for security's sake)

    MySQL
    
        * Server: Localhost via UNIX socket
        * Server version: 5.0.82-msl-usrs-sure2-log
        * Protocol version: 10
        * User: username@localhost
        * MySQL charset: UTF-8 Unicode (utf8)
    
    Web server
    
        * Apache
        * MySQL client version: 5.0.82
        * PHP extension: mysqli

    What am I doing wrong?

  2. lokrin2000
    Member
    Posted 4 years ago #

    $db_host = "localhost";

    Server: Localhost via UNIX socket

    Check with your Host. My host requires something in the form of

    $db_host = "localhost:/mysql.sock"

  3. Robert Chapin
    Member
    Posted 4 years ago #

    $db_name = "database"; is wrong??????

  4. lokrin2000
    Member
    Posted 4 years ago #

    Let's try something simple -

    Did you ever create a database?

    If so, what did you name it? What user name and password did you create it with?

    Don't post the last answer here.

  5. dotchan
    Member
    Posted 4 years ago #

    Yes, I created the database. If the old database name was "database", for example, the new one is simply "username_database".

  6. dotchan
    Member
    Posted 4 years ago #

    Nevermind, I've asked my host, and I'm going to try their answer first.

Topic Closed

This topic has been closed to new replies.

About this Topic