I created a database using Mysql Workbench. Now I want to export this database to my home PC.
How can I do this if the 2 PCs have no network connection?
I created a database using Mysql Workbench. Now I want to export this database to my home PC.
How can I do this if the 2 PCs have no network connection?
Using gzip is pretty painless and really shrinks these files.
mysqldump -u [uname] -p[pass] [dbname] | gzip -9 > [backupfile.sql.gz]
gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname]
But man, it is 2014 - this stuff is also easy to do via a secure shell connection.
I use mysqldump to export the database. You can use something like
to store it in a file. After that you can import into another database via
As edit was rejected posting it as an answer; hope it will be helpful. Followed to the queries give by "Marc Hauptmann" -
Few quick-tips for generic issues that can be faced while performing DB dump and restore:-
mysqldump -h [hostname] -u [username] -p [database name] > backup.sql