MySQL SSH Export and Import Database in Shell Terminal
Posted by
hackerbinhminh
| Friday, July 22, 2011 at 10:52 PM
2
comments
Labels :
Mysql
In your favorite shell you can export a MySQL database and Import using the following.
on Ubuntu, my MySQL databases are located at
/var/lib/mysql/database_name
To Export a MySQL Database run:
mysqldump -v -u username -p database_name > dumpfile.sql
To Import a MySQL Database run:
mysql -v -u username -p database_name < dumpfile.sql
Source: http://stuffthatspins.com/2011/05/06/mysql-ssh-export-and-import-database-in-shell-terminal-dump/
Subscribe to:
Post Comments (Atom)