Windows通過data檔案夾恢複mysql資料庫

來源:互聯網
上載者:User

標籤:3.0   自己   sql   mysql卸載   win   logs   啟動   電腦   安裝   

mysql--1146--報錯
先找到資料庫存放地址,即Data檔案夾(複製留下來)
再用電腦管家把所有的mysql卸載
然後把mysql檔案夾弄走(卸載不會清掉它,需手動,一般在C:\ProgramData下)(可刪除,或剪下走,以防萬一)
重新安裝mysql(我用的是mysql-installer-community-5.7.13.0程式包)
如果資料庫啟動了先關閉它(因為版本,關閉是(net stop mysql57--在cmd中);啟動是(net start mysql57--在cmd中))
然後把以前的資料庫檔案(自己需要的)(在Data檔案夾下的,資料庫名即檔案夾名)複製到,新的資料庫Data檔案夾下(那些內建的資料庫別動),
把新的Data下的那五個設定檔替換為以前老的檔案(就是這五個檔案auto.cnf,ib_buffer_pool,ib_logfile0,ib_logfile1,ibdata1)
重新啟動資料庫即可

Windows通過data檔案夾恢複mysql資料庫

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.