隨筆 - 6  文章 - 0  trackbacks - 0
          <2015年9月>
          303112345
          6789101112
          13141516171819
          20212223242526
          27282930123
          45678910

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          在給mysql數據庫備份時,報錯:mysqldump: Got error: 145: Table './jxzhtopenfire/ofoffline' is marked as crashed and should be repaired when using LOCK TABLES。
          如上錯誤的解決方法如下:
          1、進入數據庫對該表進行檢測:
          mysql> check tables ofoffline;
          +-------------------------+-------+----------+-------------------------------------------------------+
          | Table                   | Op    | Msg_type | Msg_text                                              |
          +-------------------------+-------+----------+-------------------------------------------------------+
          | jxzhtopenfire.ofoffline | check | warning  | Table is marked as crashed                            |
          | jxzhtopenfire.ofoffline | check | warning  | 1 client is using or hasn't closed the table properly |
          | jxzhtopenfire.ofoffline | check | error    | Record at pos: 1175720 is not remove-marked           |
          | jxzhtopenfire.ofoffline | check | error    | record delete-link-chain corrupted                    |
          | jxzhtopenfire.ofoffline | check | error    | Corrupt                                               |
          +-------------------------+-------+----------+-------------------------------------------------------+
          5 rows in set
          2、使用repair解決方法:
          mysql> repair table ofoffline;
          +-------------------------+--------+----------+------------------------------------------+
          | Table                   | Op     | Msg_type | Msg_text                                 |
          +-------------------------+--------+----------+------------------------------------------+
          | jxzhtopenfire.ofoffline | repair | warning  | Number of rows changed from 2349 to 2451 |
          | jxzhtopenfire.ofoffline | repair | status   | OK                                       |
          +-------------------------+--------+----------+------------------------------------------+
          再次進行dump備份就可以了。

          備份mysql數據庫時報錯:mysqldump: Got error: 145: Table './jxzhtopenfire/ofoffline' is marked as crashed and should be repaired when using LOCK TABLES。

          這樣的錯誤。
          搜索了一下,發現只要在mysqldump的時候加上--lock-tables=false就可以解決問題。
          mysqldump -u root -pMyPassword DbName --lock-tables=false > data.sql

          posted on 2015-09-30 09:56 Glorin 閱讀(2047) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 哈巴河县| 扎鲁特旗| 佛学| 开鲁县| 巨鹿县| 嘉峪关市| 西峡县| 收藏| 厦门市| 泸水县| 汝州市| 嘉峪关市| 资溪县| 青河县| 寻甸| 牙克石市| 上高县| 东山县| 东莞市| 永寿县| 佛冈县| 濮阳市| 朝阳县| 辉南县| 和龙市| 西华县| 铁岭市| 保定市| 库车县| 开封县| 溧水县| 侯马市| 儋州市| 漠河县| 昌江| 磐石市| 江北区| 商洛市| 农安县| 莱阳市| 西平县|