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 Answers 2

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
1
  • 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? Oct 23, 2015 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .