mikeoffy69 Posted January 13, 2009 Share Posted January 13, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/140715-local-server-help/ Share on other sites More sharing options...
rhodesa Posted January 13, 2009 Share Posted January 13, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/140715-local-server-help/#findComment-736538 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.