Report this

What is the reason for this report?

Can't connenct msyql remote server

Posted on July 18, 2016

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:~#



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!

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;

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.