Question

please be aware that this topic grant remote access of MySQL database from any IP address i cant understand any thing from

My scenario is i have a local network that have a centos linux server the server ip address are : 172.20.17.30 and this server will contain LAMPP and its allow any port to access the server so every one can access the server localhost by going to this ip : 172.20.17.30 and this is working great and i have a software on many other PC's on the same network

This software are scanning images from scanner and the upload it by ftp to the server and make a record of this image on mysql database using MYSQL connector , My issue is that this software developed on localhost mysql connection but in the deployment for this software it will be non localhost connection . and i then faced the issue of not being able to connect database from outside localhost and the whole resources i can gate are describing how to allow one ip address or more to connect the mysql .

But this solutions are not feet well on my scenario because i cant know how many PC's this software will be installed on

any help will be great from you many thanks in advance

best regards

Était-ce utile?

La solution

This is easy. find my.cnf file (location depends on your OS ). open it and make following entry:

bind-address = 172.20.17.30

Now you can access mysql server from anywhere using following command:

mysql -u username -h 172.20.17.30 -p(ur_password)

If it doesn't work check the following:

Port 3306 is open in Windows Firewall (in case of windows) or iptables (in case of linux)

Are you able to ping 172.20.17.30 from remote PC?

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top