1

Using JDBC, I am currently trying to connect to a server hosted on the same network using MAMP.

Using this string: private static final String DB_CONNECTION = "jdbc:mysql://192.168.169.101:8889/";

I received this error: message from server: "Host '192.168.169.98' is not allowed to connect to this MySQL server"

I am wondering if this is a firewall error?

theGreenCabbage
  • 5,197
  • 19
  • 79
  • 169

2 Answers2

1

Comment out 'skip-networking' in your my.cnf file.

If skip-networking is commented out, then it's a user level permission which needs to be set in the mysql.user or mysql.database tables.

awm
  • 2,723
  • 2
  • 18
  • 26
  • If you're just testing: MYSQL> USE mysql MYSQL> update user set Host="%" WHERE 1=1 That'll remove all restrictions from all users. – awm Nov 08 '13 at 21:51
1

MySQL wants you to GRANT permission for users to connect to the server by IP address and credentials. I think it's a good idea to set up credentials for that particular database and user and GRANT only the permissions necessary to accomplish the task.

Don't use the root admin credentials for anything except administration.

http://dev.mysql.com/doc/refman/5.1/en/adding-users.html

duffymo
  • 305,152
  • 44
  • 369
  • 561