Jump to content

local server help


mikeoffy69

Recommended Posts

Hello

 

I set-up mysql and php on my network server. Everything is working great except one little thing :)

 

When I try to run the same file from a different computer by just mapping to it it doesnt work. Well it kinda works atleast anything thats no database driven. Its not seeing the database. How do I get another computer on the same network to read the same database? Is this Possible?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/140715-local-server-help/
Share on other sites

sure...couple things though

 

1) The client must be able to access the MySQL port of the server. If they are both on the same network, this shouldn't be a problem. If one is behind a separate router, you will have to set up some port forwarding.

2) The PHP code must be pointing at the server. If the client/server are on separate systems then you can't use 'localhost' as the host to connect to. Use either the hostname or IP address (if it's static) of the server when connecting with PHP.

3) MySQL permissions need to be set to allow connections from outside localhost. I recommend using phpMyAdmin to check the privileges. Make sure that user allowed to connect from % (that allows connections from anywhere) or the specific IP of the client if you know it

Link to comment
https://forums.phpfreaks.com/topic/140715-local-server-help/#findComment-736538
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.