UnixGuru Hosting

×
×

How do I restore a very large database from a dump taken elsewhere?

Back

The best, fastest and most certain way to import a very large database from a dump taken elsewhere is via the command line.

  1. Create the new empty database with the MySQL management tool.
  2. FTP the dump file into your web space somewhere
  3. use the command mysql -u dbusername -pdbpassword database-name < dumpfile.sql

Note.

A space between -u and the dbusername

NO space between -p and the dbpassword

You specify which database you are importing into and a left chevron and the name of the dump file.

 

It's best to do this for the following reasons.

  • FTP has no time limit in which to upload the file.
  • The command line, unlike a web-server, won't time-out if it takes too long.

 

We recommend the use of PuTTY to SSH into the command line, however, any decent SSH Client will work.

Please note that mysql imports via command line or web import, are subject to I/O and CPU controls, so that customers importing data do not make the database unavailable for users users.

Was this article helpful?
Dislike0 Like0

Views: 535