Importing a text file containing a list of SQL commands into
MySQL is a straightforward task. All you need to do is simply
feed the file contents through pipe into MySQL command line
client. For example:
mysql app_production <
The reasons for doing such imports can be very different -
restoring MySQL backups created with mysqldump, manually
replaying binary log events or performing database migrations
during software roll-outs.
While the task is simple, the import may not end successfully and
when this happens, how to tell what the problem was?
Whenever database hits an error, … [Read more...]