隨筆 - 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 閱讀(2048) 評論(0)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 武冈市| 延吉市| 宁乡县| 中超| 依兰县| 肥东县| 尚志市| 襄垣县| 成武县| 嘉峪关市| 韶山市| 嘉禾县| 金川县| 汉源县| 长白| 正镶白旗| 马关县| 云浮市| 太康县| 夏邑县| 浦县| 佛山市| 星子县| 闸北区| 潼关县| 万源市| 松阳县| 赤水市| 武宁县| 康定县| 禄劝| 涡阳县| 类乌齐县| 东台市| 郸城县| 阳谷县| 大姚县| 图们市| 尤溪县| 随州市| 江门市|