MYSQL Restore a large database on a remote server

Hello to all,

I am trying to recover almost 8 GB of DB to a remote server using the mysql command on the command line. It has been 8 hours since the start of the process. But he is still restoring the database. I tried using the command

> mysql -h hostname -u username -p dbname < location of the dump file 

My questions:

  • Does it take many hours to recover so many databases?

  • Is it possible to restore an 8 GB database?

  • Am I doing the right thing?

  • Is there any other better way to restore a database?

+4
source share
1 answer

Command

 mysql -h IP -u Username -p schema < file 

Example

 mysql -h 192.168.10.122 -u root -p mydatabase < /tmp/20160628_test_minificated.sql 

Does it take many hours to recover so many databases?

Depends on dump file size and connection speed.

Is it possible to restore an 8 GB database?

Yes, that way you can restore large databases.

Am I doing the right thing?

For me, this is the best way when you work with the command line interface and the destination is also the command line interface.

Is there any other better way to restore a database?

Yes, you have several options, such as phpmyadmin, workbrench, heidisql and many others, but each has its own limitations.

-1
source

All Articles