現象
第一次執行ddl操作時由於oom導致中斷,再次執行這個ddl報錯
alter table `db_order4` add `tracknumber1` varchar(45) default null comment '內部單號' after `tracknumber`;
error 1050 (42s01): table 'mabang_order/#sql-ib9302' already exists
處理方法
1 create table tmp like table_name;
2 alter table tmp add `tracknumber1` varchar(45) default null comment '內部單號' after `tracknumber`;
3 cp tmp.frm "#sql-ib9302.frm"
4 改許可權為mysql chown mysql:mysql "#sql-ib8665.frm"
5 drop table `#mysql50##sql-ib9302`
6 檢查下主從狀態,跳過錯誤
7 再次執行alter table `db_order4` add `tracknumber1` varchar(45) default null comment '內部單號' after `tracknumber`;
故障原因
應該是ddl時由於db宕機等非正常關閉導致無法全部回滾,殘留了一些臨時檔案,具體是個什麼流程未知
mysql 故障案例 mysql故障案例
錯誤 error 1044 42000 access denied for user root to database dede mysql create database dede error 2006 hy000 mysql server has gone away no connection....
mysql故障案例 mysql故障案例
mysql create database dede error 2006 hy000 mysql server has gone away no connection.trying to reconnect.connection id 47299 current database none que...
故障排錯實戰案例
實戰案例1 centos 7 8 破壞mbr後進行恢復 dd if dev zero of dev sda bs 1 count 446 光碟進入救援模式 grub2 install root directory mnt sysimage dev sda 實戰案例2 entos 7 8刪除 boot...