Error: database connection fails with virtual host and a different database host (1 post)

  1. ECadmin
    Posted 9 years ago #

    Hi guys,

    I'm having issues trying to install wordpress.

    I would like to have the web server running locally on my computer (XXpc) and the database in a different host (YYserv).

    I created a virtual host for my blog : http://XXpc.blog.my-domain.com

    In wp-config.php I have this :
    define('DB_HOST', 'YYserv.my-domain.com');

    Unfortunately, when I try to reach href="http://XXpc.blog.my-domain.com">http://XXpc.blog.my-domain.com
    I get this :

    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.

    NB: It works if I try to reach but I don't want that.

    Any ideas ?

    Thanks :)

Topic Closed

This topic has been closed to new replies.

About this Topic