Reputation: 393
How to dump and download MySQL from Google Clould's VM?
I have a Google VM instances Cent OS. Magneto was install there with MySQL and Apache.
I want to download the database which is in Local-host.
I have tried couple of commands and it's showing "ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqldump db | ssh test.host mysql db' at line 1"
Below are the commands did not worked.
mysql> mysqldump -u magento -p magento | gzip > magento.db.sql;
mysql> mysqldump -u magento -p magento > db_dump.sql;
mysql> mysqldump db | ssh test.host mysql db;
mysql> mysqldump /var/dbbackup/backup.sql;
Please check screenshot below. mydatabase name : magento db user name : maganto.
Upvotes: 0
Views: 608
Reputation: 686
Exit from MySQL Prompt and do like below from direct Linux terminal
$ mysqldump -uusername -p dbname > /var/dbbackup/db_backup.sql;
Upvotes: 2