alter table 时 出现 waiting for table metadata lock 的处理

537 阅读1分钟
FLUSH TABLES coins_transaction WITH READ LOCK;
START TRANSACTION;
alter table coins_transaction modify column `number` int(10) NOT NULL;
COMMIT;
UNLOCK TABLES;