Support » Localhost Installs » LAN computer unable to connect to DB

  • Running WAMP, accessing on localhost works fine. I was able to figure out how to open WAMP to my LAN, (define('DOMAIN_CURRENT_SITE', '');) and I can access it, but I get WordPress’ unformatted “Error establishing database connection” error. I’m stuck.

    Changing DB_HOST to my network IP gives me wp_die screen. With wp_debug set to true, I get the error “Host is not allowed to connect to this MySQL server”

    Either I’ve set my wp-config.php up incorrectly, or I need to change a setting in one of the config files of Apache, MySQL.

    Other than one change I made to httpd.conf to allow for network connection, all settings of php, apache, mysql are the same: mysql user is root with blank password.

    (I’m running multi-site, but I don’t think that should matter much..?)

    Any thoughts here? Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • There’s no reason to chagne DB settings at all if it works, and you don’t need to define DOMAIN_CURRENT_SITE. Why do you think that you need ot change the DB settings to the IP or something other then “localhost”?

    Well, I changed DOMAIN_CURRENT_SITE because if I left it at localhost, and then accessed the site from my laptop, it’s localhost would appear, not the host of the network server (as WordPress changes the URL to the value of DOMAIN_CURRENT_SITE.

    Secondly, once I change DOMAIN_CURRENT_SITE to the network IP of the machine running WAMP, I am clearly able to access WordPress from the host, but I am being denied connection to the database, as I described above.

    It is only partially working. I am thinking that something must be changed, since it’s not working: either in wp-config.php, or in one of the config files of Apache/MySQL.




    Forum Moderator

    See Changing_The_Site_URL for details of how to do this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘LAN computer unable to connect to DB’ is closed to new replies.