1

I have a Desktop application which is connected with a website and data is being accessed from MySQL. Every time i have to add an IP to the mysql remote access then it allow Desktop application to connect with website and fetch data. IP is being changed every time when computer restart and this application is installed on so many computers every computer has the same ip changing issue.

My Question is how can I bypass this "IP" issue and allow all ips to access data from web.

vdwijngaert
  • 1,515
  • 11
  • 24
Malik.Akhtar
  • 29
  • 2
  • 6
  • 1
    possible duplicate of [grant remote access of MySQL database from any IP address](http://stackoverflow.com/questions/8348506/grant-remote-access-of-mysql-database-from-any-ip-address) – Sojan Jose Apr 21 '15 at 10:01
  • This is why you should be using webservices and your desktop app should be connecting via webservices rather than direct db access. Having said that you can just change the hostname of your mysql remote access user to % and that'll work too but security goes right out the window – Dave Apr 21 '15 at 11:51

1 Answers1

3

this is the sql command to provide access for a user on particular database.

GRANT ALL PRIVILEGES
ON database.*
TO 'user'@'%'
IDENTIFIED BY 'newpassword';

'%' is wild card and allows connections from all ip addresses .

check this thread for more details .

ps : Make sure you only grant needed permissions. Don't copy/paste command as it is. check docs for details of various mysql permissions.

Community
  • 1
  • 1
Sojan Jose
  • 3,168
  • 6
  • 33
  • 52