how to mysqldump remote db from local machine

后端 未结 4 1127
野的像风
野的像风 2020-12-07 07:07

I need to do a mysqldump of a database on a remote server, but the server does not have mysqldump installed. I would like to use the mysqldump on my machine to connect to th

4条回答
  •  半阙折子戏
    2020-12-07 07:53

    One can invoke mysqldump locally against a remote server.

    Example that worked for me:

    mysqldump -h hostname-of-the-server -u mysql_user -p database_name > file.sql
    

    I followed the mysqldump documentation on connection options.

提交回复
热议问题