Reputation: 19842
I have three pcs and each one runs xampp. I want the other two use the third pc's mysql database in order to have only one database for development and not three.. How should I setup my pcs to work like this?
Thanks in advance
Upvotes: 1
Views: 3751
Reputation: 4434
Configure a static IP for the computer hosting the database. When you use PHP to connect to the database from one of the other computers, set the host to this IP. Also make sure you have commented out #bind-address = 127.0.0.1
in my.ini as TJHeuvel noted.
Upvotes: 0
Reputation: 41
Open the mysql connection on php code running on the first two pcs, setting for both the ip of third as db_host.
Upvotes: 1
Reputation: 12618
You'll have to change the my.ini to listen to TCP/IP, as described here http://www.howtogeek.com/howto/mysql/switch-mysql-to-listen-on-tcp/
Upvotes: 0