Exporting Percona Database

Exporting percona database is however a bit tricky way to make funcitonal. The usual-

mysqldump -u root -p [database] > database.sql

will stuck and shoot you many error. All you need is the add an extended parameters to execute the dump, and here it is:

mysqldump -u root -p [database] lock-for-backup > database.sql

And that should do the trick!

Src: 

https://www.percona.com/doc/percona-server/5.7/flexibility/extended_mysqldump.html

Share

Importing Big mysqldump with Progress Bar PV

I am using CentOS 6.4 box, so it requires me to install EPEL repo at the first place:

$ rpm -Uhv http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Install pv using yum:

$ yum install -y pv

Installation done. Let the importing begin!

$ pv /home/user/my_big_dump.sql | mysql -uroot -p

For Ubuntu/Debian distribution intall PV using-

apt-get install pv

 

Share