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

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


          網站導航:
           
          主站蜘蛛池模板: 南阳市| 衢州市| 庆元县| 来宾市| 宁津县| 克山县| 凭祥市| 靖边县| 平度市| 桃江县| 邵东县| 吴川市| 鹿邑县| 隆回县| 郴州市| 江孜县| 晋宁县| 德庆县| 姜堰市| 广丰县| 宜兴市| 东乡族自治县| 鹿泉市| 沾益县| 桐乡市| 沿河| 邵阳县| 永年县| 梁平县| 育儿| 剑阁县| 太原市| 清流县| 通海县| 大同县| 芜湖县| 九江县| 绍兴县| 芦溪县| 张家港市| 安塞县|