Question

Can't connenct msyql remote server

I use Ubuntu 14.04.4 x64 for App server (IP : 10.130.16.27) and Ubuntu 14.04.4 x64 installed Mysql server 5.7.13 (IP : 10.130.40.80)

then I try to connect from App server to Mysql server with command

root@GatewayServer:~# mysql -u gps -h 10.130.40.80

and I got error below system show self ip not remote ip

Warning: Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user ‘gps’@‘10.130.16.27’ (using password: YES) root@GatewayServer:~#


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Yes i did still not work

You need to grant user gps access when connecting from 10.130.16.27. You can do that by running the following command in MySQL. You can also replace 10.130.16.27 with % to allow all hosts.

GRANT ALL PRIVILEGES ON *.* TO 'gps'@'10.130.16.27' IDENTIFIED BY 'password_for_user_gps' WITH GRANT OPTION;
FLUSH PRIVILEGES;