0

I have a cloud server with MySQL in it. In this moment, i can't connect from my pc to the server using any of the users.

What it want is allow to use mysqldump with an specific user and only allow connect trough one ip (my ip, obviously).

How i do that?

2

If you need that some specific user make backups remotely, this settings could be helpful:

GRANT SELECT, LOCK TABLES, SHOW VIEW, RELOAD ON *.* TO 'user'@'ip'
IDENTIFIED BY 'password';

If you want restrict the access, use a firewall. Later, you can use SSH (as you say):

ssh usr@host mysqldump -u dbuser -ppass databasename > dumpfile.sql

Or access directly to MySQL port:

mysqldump -h Your_host_name -u user_name -p password --all-databases > backup.sql
  • That's whay i have now. But i need to also restrict to only connect from one specific IP (Host). I do it this way, but the user can't connect. Any hint? – Santiago Mendoza Ramirez Oct 23 '15 at 13:07
0

Well, looking on internet i found this answer:

ssh usr@host mysqldump -u dbuser -ppass databasename > dumpfile.sql

And it works perfectly. The user only need localhost permissions. And i don't need to open a extra port.

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.