I want to connect a Desktop Application (C#) with a website which is hosted on BLUEHOST Server (Shared Hosting). I have to add an IP on server to allow for remotely access to mysql database. But the issue is computer IP is being changed certainly and every time I get an error when application tries to connect to database (MYSQL) and every time I have to add new IP on server. This application is installed on so many pcs and IPs are being changed every time when PC restart. My question is, is there any way to allow all IPs or bypass this???
Asked
Active
Viewed 1,291 times
0
-
1This is pretty much what DNS is for. – Hyppy Apr 28 '15 at 13:08
1 Answers
0
There is a way to allow connection from all IPs when it comes to MySQL. If it in in user definition you need to create your user like this:
grant all privileges on databasename.* to 'username'@'%' identified by 'usernamepassword';
flush privileges;
This % after @ means there are no restriction on the ip address connecting to DB. You can also take a look to grant syntax on MySQL documentation at https://dev.mysql.com/doc/refman/5.1/en/grant.html
![](../../users/profiles/274818.webp)
alphamikevictor
- 1,062
- 6
- 19
-
i have to whitlist the ip. it will connect after that but Ip change when network change. where i have to run this command. – sharjeel khalil Apr 28 '15 at 15:31
-
On your MySQL prompt, unless you are registering the ip address on some firewall. Your question lacks some details which makes a bit hard to focus on the real problem. – alphamikevictor Apr 28 '15 at 15:36