MySQL导入需要很长时间才能完成/永无止境

时间:2014-08-27 20:30:19

标签: mysql mysqldump

我~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

我跑的命令:

mysqldump DB1 | pv | mysql DB2

所以它几乎是从1个数据库到另一个数据库的直接副本,DB2从空开始。

我实际上可以看到数据已经在DB2,但命令拒绝结束!

所以问题是......我应该让它继续运行吗?或者我可以杀了它? :/

更新:

SHOW PROCESSLIST;

+------+--------------+---------------------+------------+---------+------+--------+------------------------------------------------------------------------------------------------------+
| Id   | User         | Host                | db         | Command | Time | State  | Info                                                                                                 |
+------+--------------+---------------------+------------+---------+------+--------+------------------------------------------------------------------------------------------------------+
| 2762 | user1        | localhost           | DB2        | Query   | 5298 | Locked | /*!50003 CREATE*/ /*!50020 DEFINER="user2"@"%"*/ /*!50003 FUNCTION "function1"                       |
| 2763 | user1        | localhost           | DB1        | Sleep   | 5298 |        | NULL                                                                                                 |
| 2770 | user2        | localhost           | NULL       | Query   | 3633 | Locked | SELECT COUNT(*) FROM `INFORMATION_SCHEMA`.`ROUTINES` WHERE `ROUTINE_SCHEMA`='DB2' AND `ROUTIN        |
| 2775 | user2        | localhost           | NULL       | Query   |  381 | Locked | SELECT COUNT(*) FROM `INFORMATION_SCHEMA`.`ROUTINES` WHERE `ROUTINE_SCHEMA`='DB2' AND `ROUTIN        |
| 2776 | user2        | <ipaddress>:<port>  | NULL       | Query   |    0 | NULL   | show processlist                                                                                     |
+------+--------------+---------------------+------------+---------+------+--------+------------------------------------------------------------------------------------------------------+

我的一些设置是非标准的:

innodb_stats_on_metadata=0
innodb_flush_log_at_trx_commit=2

0 个答案:

没有答案