MySQL/migration/CLI
Jump to navigation
Jump to search
|
MySQL migration using CLI
|
About
There are two parts to the migration process: exporting data (generating an importable file from the source database server) and importing data (converting a file into a database on the server).
- Export: There is a utility program, mysqldump, which is specifically for handling this task. (It may be possible to replicate everything it does via SQL, but there's a lot of information in comments, and perhaps even pragma-code, which would be difficult to replicate precisely; I'm not sure if this is documented anywhere.)
- Import: This is basically just running mysql from CLI and then piping in the entire contents of the exported
.sqlfile.