i have a virtual ubuntu server running in windows 7 pro using VMware Player.
i have to connect to a mysql database which is there in windows7 (local) from the ubuntu server.
when i try connect to the database which is present in the windows7 from ubuntu server i get error saing Host ‘ the windows7-PC ‘ is not allowed to connect to this MySql server.
jdbc:mysql://mywindows7_IP:3306/mysql
You’ve to add the permission to connect from another IP to the username you’re using. You can add an entry to
mysql.usertable duplicating the user you’re using and changing theHostcolumn to allow the IP address of your Ubuntu, or change the existingHostentry with%, which actually allows to connect from everywhere.There is also an
Hostfield in thedbtable, so in case you’ve restricted the access of that username to a particular DB, then you’ve to fix alsomysql.dbtable.After those changes, do a
FLUSH PRIVILEGES, so MySQL can pick them up.