2

I am trying to execute mysql query from another ubuntu system.

I have granted permission to user using GRANT from 192.168.64.9

GRANT ALL ON . to 'user'@'192.168.64.11' WITH GRANT OPTION;

and then on 192.168.64.11

sudo mysql -u user -p 'password' -h 192.168.64.9

ERROR 10045 ACCESS DENIED FOR user@192.168.64.11

1

There was a typo in your grant statement that attempted to grant all on ., which is not valid.

Instead, do the following:

CREATE USER IF NOT EXISTS 'user'@'192.168.64.11' IDENTIFIED BY 'theuserpasswordgoeshere';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'192.168.64.11' WITH GRANT OPTION;

Then:

FLUSH PRIVILEGES;

Now you should be able to query remotely from the client at 192.168.64.11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.