Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.