I have a MySQL database existing on a remote server. I only have sql connection privilege. I don't have FTP access to the server, and I need to do a complete dump of the database. I have tried mysqldump
, but the issue is that it is creating the output on the server and as I don't have FTP I can not get the output from the server.
How can I do a clean backup and get the dump in my local machine(of course, the backup should be restored in my local machine)?
You have to shut down mysql server (which is not good, if it's a production server) You have to make sure the permission of data (mysql) directory is same as the previous one. You will have to monitor the mysql_error log while starting the second server.
To backup multiple MySQL databases with one command you need to use the --database option followed by the list of databases you want to backup. Each database name must be separated by space. The command above will create a dump file containing both databases.
You can specify the server name as an option to mysqldump
:
mysqldump --host servername dbname > dbname.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With