Arif
Arif

Reputation: 1211

Use one local MySQL database from different PCs on LAN

I have a PHP-MySQL application and I want to use one database from different PCs. I got my answer in this question someone asked: Accesing XAMPP MySql Database from Another Computer.

Now the problem is that they mentioned my.cnf file to edit but I don't have such a file in my xampp folder. Is there any other file we can edit for these settings?

Upvotes: 0

Views: 4272

Answers (2)

Arif
Arif

Reputation: 1211

I got the answer and I tested also how to access one PC MySQL database from different PCs on LAN :)

you just need to put the IP of that PC where you install your MySQL server. For example

192.168.1.3/xampp/ OR 192.168.1.3/my_php_project/index.php

In the above link 192.168.1.3 is the IP of the PC where MySQL server is installed

Upvotes: 2

ioan
ioan

Reputation: 509

This could help you :

http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html

After that, your mysql user must allow that kind of connection (the server has to be set to '%'). Check the SQL command:

GRANT ALL ON foo.* TO bar@’%’ IDENTIFIED BY ‘PASSWORD’;

Upvotes: 0

Related Questions