Wordpress access on LAN
Posted by: crstauf (---.se.biz.rr.com)
Date: November 09, 2012 01:20AM

Running WAMP, accessing on localhost works fine. I was able to figure out how to open WAMP to my LAN, (define('DOMAIN_CURRENT_SITE', 'xxx.xxx.xxx.xxx')winking smiley 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.

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: November 09, 2012 10:41AM

Undo all that.

Just put your wamp manager ONLINE
wampmanager -> Put Online

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: crstauf (---.se.biz.rr.com)
Date: November 09, 2012 03:05PM

ok, so i did. i attempted to access the host from another computer on the same network, by going to xx.xx.xx.xx/wp, and it redirects to locahost/wp, 404 error.

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: November 09, 2012 05:12PM

Oh right Wordpress stores the domain name you use when you are installing.

So if you install it from the wamp PC i.e. localhost is stores that as the domain name and uses it internally.

You need to edit the wordpress database. Table = wp_options ( assuming you took the default table extension )

Anywhere you see [localhost]......

Change it to the correct domain name you want to use.

Also its helpfull to add that domain name to your HOSTS file if you dont have a DNS Server running
so add something like this to the hosts file on the PC you want to access the site from

testing.wp.com 192.168.1.10

The ip address is that of the PC running wamp.

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: crstauf (---.se.biz.rr.com)
Date: November 09, 2012 05:17PM

that's why i did this:

define('DOMAIN_CURRENT_SITE', 'xxx.xxx.xxx.xxx')

i'm able to get to wordpress from another computer, i just can't access the mysql database: wordpress can't connect, using root user with blank password.

do i need to tell the mysql service to allow something, or should all of that be set? i'm using WampServer 2.2.

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: stevenmartin99 (Moderator)
Date: November 09, 2012 08:12PM

No, mysql doesnt connect from another pc....

the local php files are connecting to a local mysql so its actually not possible for you to get mysql connections errors only from another pc and not locally

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: crstauf (---.se.biz.rr.com)
Date: November 09, 2012 08:20PM

so, basically, no one can connect to mysql in wamp setup from a networked computer, other than the host?

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: stevenmartin99 (Moderator)
Date: November 09, 2012 08:43PM

your not understanding,,,, The site is running on your pc with wamp and its those files that are connecting to mysql , so the connection will always be LOCAL....

so of course people on the network can use wordpress, but they are not connecting to mysql , the site is, and the site is on the same pc as mysql.

So you are wrong telling us that wordpress words locallly and not on network because of mysql errors, This just is not possible to happen

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: crstauf (---.se.biz.rr.com)
Date: November 09, 2012 08:53PM

oh i think i gotcha now. sorry for the incorrect syntax. so how come wordpress can't connect to the db when i access the host from within the network? any thoughts?

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: stevenmartin99 (Moderator)
Date: November 09, 2012 08:54PM

teamviewer and ill have a look?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: crstauf (---.se.biz.rr.com)
Date: November 09, 2012 08:56PM

unfortunately, i'm trying to set this up at my office, and don't think my boss would be very thrilled about that. can i send you screenshots of stuff? i really appreciate your help on this Steven. please, if you can just tell me what you need from me, i'll do my best to get it to you.

thanks.

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: stevenmartin99 (Moderator)
Date: November 09, 2012 08:57PM

is mysql working at all?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: crstauf (---.se.biz.rr.com)
Date: November 09, 2012 08:58PM

mysql works on my host server.

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: stevenmartin99 (Moderator)
Date: November 09, 2012 09:01PM

like i said in my previous , this is not true, Its not possible to have it working on localhost but not on the network....

your maybe not understanding what i was saying above...

mysql runs on localhost always.. as its the php files that connect to it. there is no difference in either case..

something else is the issue, send me screen shots of it working on localhost and not working on a network ip...

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: crstauf (---.se.biz.rr.com)
Date: November 09, 2012 09:15PM

ok well, whatever the correct way to say that it works when accessing from the computer that wamp is installed on and not on a networked computer, that's what's happening.

screenshots coming.

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: stevenmartin99 (Moderator)
Date: November 09, 2012 09:20PM

if you said that wordpress wasnt working at all i would understand, but you are saying wordpress is only giving an error about "db connection error"

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: crstauf (---.se.biz.rr.com)
Date: November 09, 2012 09:26PM

[css.yourbro.com]

first screen is localhost/wp/wp-admin, running on settings found on second screen (wp-config.php).

"Error establishing database connection" is partial screenshot of the computer i'm attempting to access wamp from.

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: stevenmartin99 (Moderator)
Date: November 09, 2012 10:33PM

just delete Domain Current site


goto the options table and change localhost to the IP....

and use the IP for both localhost and network.


did you already run some plugin that made changes,,, can i think iv seen this issue before only for that..

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: stevenmartin99 (Moderator)
Date: November 09, 2012 10:33PM

just delete Domain Current site


goto the options table and change localhost to the IP....

and use the IP for both localhost and network.


did you already run some plugin that made changes,,, can i think iv seen this issue before only for that..

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Wordpress access on LAN
Posted by: crstauf (---.se.biz.rr.com)
Date: November 09, 2012 10:52PM

thanks for your help steven. unfortunately, being Friday, i've become very busy in my last hour of work, so won't have time to test this until Monday. will pick it up then.

have a great weekend!

Options: ReplyQuote


Sorry, only registered users may post in this forum.