Connecting to MySQL across Domain and workgroup

I have a mysql running in a box connected to a domain. I tried to connect it from a laptop not connected to the same domain. It is running as a workgroup. Though the parameters are correct, I got an error ‘Error Code: 1045’

An error occured while establishing the connection.
 Type: java.sql.SQLException   Error Code: 1045   SQL State: 28000
 Message:
 Access denied for user 'root'@'192.168.10.74' (using password: NO)

But I am able to connect to Oracle DB which is running in the same environment. Googling fetch me some results saying we need to give permissions suitable for the situation. I ran the following query which solved the connectivity issue.

GRANT ALL ON *.* TO 'root'@'%' IDENTIFIED BY 'your_root_password';
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s