snippetsqlMinor
How can I import/export a MySQL database without redirection?
Viewed 0 times
canwithoutredirectiondatabasemysqlexporthowimport
Problem
I've been told that redirection via shell (e.g. `` ) can (not always) affect the collation of a database (.e.g utf8). How can I import an export without redirecting so that I don't have to worry about this.
Solution
There's always the mysqlimport utility, however, your source would have to be delimited values... such as those obtained from a "SELECT * FROM ... INTO OUTFILE ..."
If you're moving large amounts of data, it might be faster to use this bulk loading method anyway.
Beware of the consequences it may have with replication however.
If you're moving large amounts of data, it might be faster to use this bulk loading method anyway.
Beware of the consequences it may have with replication however.
Context
StackExchange Database Administrators Q#2167, answer score: 4
Revisions (0)
No revisions yet.