Monitor progress of data

The pv command allows you to see the progress of data through a pipeline.
Because default pv command is not installed. Type the following:

#yum install pv

Ok, try this:

pv dumpfile.sql | mysql -uxxx -pxxx dbname

will show a progress bar as the program runs.

Sample output:

[root@server5]# pv mysql-chicken_war.30-10-2013-14_00_01 | mysql -uroot -p chicken_war
Enter password:
718MB 0:05:21 [2.23MB/s] [=================================================>]100%

Ok, try to login to phpMyadmin. Hmmm, I cant see any tables?
Back to sql command. Type the following:

mysql> show tables;

mysql> SELECT table_name FROM information_schema.tables where table_schema = DATABASE();

Sample output:

ERROR 1143 (42000): SELECT command denied to user ”@’localhost’ for column ‘xxxx’ in table ‘xxxx’

I can see has problem with permission on column ‘xxx’. Try to fix it, problem solved.

Enjoy!

Advertisements