MySQL database import-export from Shell
The control panels provide GUI for import / export databases. However, it is very easy doing the same from shell.
Exporting Database
mysqldump dbname > exportfile.sql
This will export the database to exportfile.sql.
You can optionally compress the file to save bandwidth during server to server transfer. Run the following command:
gzip exportfile.sql
Database Import
To import a database from an sql dump file run the following command:
mysql dbname < exportfile.sql
This will import the sql instructions in file exportfile.sql into the database.
This will export the database to databasename.sql
To import a database from an sql dump file run
a WordPress rating system
No related posts.
Comments
2 Responses to “MySQL database import-export from Shell”Trackbacks
Check out what others are saying about this post...[...] Read more here: MySQL database import-export from Shell | Control Panel Blog [...]
[...] See the original post here: MySQL database import-export from Shell | Control Panel Blog [...]