MySQL restore huge/large database

Posted: 10/02/2017 in linux, mysql
Tags:

Problem:

Restore >1GB database dump;

  • phpmyadmin – too slow, errors, php.ini modifications etc.
  • mysqldump – slow, errors ex. BLOB

 

Solution:

  • create empty database, for example by phpmyadmin
  • connect to it:

mysql -u usertest -p databasetest

  • type path to db dump:

source /backup/databasetest_2017-10-01.sql

 

Output:

You will see progress like:

Query OK, 7146 rows affected (0.42 sec)
Records: 7146 Duplicates: 0 Warnings: 0

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s