• Well, I have multiple wordpress installations and they all run on the same database. I want to define the database information in only one file, so i made a mysql.php in my root. I then put the information in the file,

    define('DB_NAME', 'blog');    // The name of the database
    define('DB_USER', 'blog');     // Your MySQL username
    define('DB_PASSWORD', 'password'); // ...and password
    define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');

    and then changed the wp-config file like the following where the mysql information was,
    include '../mysql.php';

    For some reason this doesn’t work.

    Wordpress throws 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 DB_HOST

    Yet, all the info is correct.

    Please help,
    Eddyys

  • The topic ‘Multiple WordPress, One Database’ is closed to new replies.