BoardiesITSolutions / Android-MySQL-Connector

Native MySQL Connector for Android
MIT License
51 stars 15 forks source link

Access Denied #10

Closed Asuki closed 5 years ago

Asuki commented 5 years ago

Hi!

With your help I created a connection. I got grant access and the connection was ready. With SELECT statements I got the data. After that My ip address changed and I got Access denied again. Do you think the access depends on ip? I mean if I got access with an ip I can connect, but if my ip not in white list i couldn't.

Thanks Seng

boardy commented 5 years ago

Hi Seng,

It would do yes, I'm assuming when the GRANT PRIVILEGE is being done they're putting in a specific IP so they're only allowing logins from known IPs.

You can white list everything by putting % in place of the IP address, e.g. GRANT ALL PRIVILEGES ON mydb.* TO 'user'@'%';` The above would mean the user could read/write mydb from any IP address although could potentially be a security risk.

Thanks

Chris

Asuki commented 5 years ago

Hi Chris!

Thanks for your help.

Seng