Windows下的MySQL刪除data文件夾后……


MySQL刪除data文件夾后,怎么都無法啟動了,出現錯誤:

150106  9:28:43 [Note] Plugin 'FEDERATED' is disabled.
wampmysqld: Table 'mysql.plugin' doesn't exist
150106  9:28:43 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
150106  9:28:43 InnoDB: The InnoDB memory heap is disabled
150106  9:28:43 InnoDB: Mutexes and rw_locks use Windows interlocked functions
150106  9:28:43 InnoDB: Compressed tables use zlib 1.2.3
150106  9:28:43 InnoDB: Initializing buffer pool, size = 141.0M
150106  9:28:43 InnoDB: Completed initialization of buffer pool
150106  9:28:43 InnoDB: highest supported file format is Barracuda.
150106  9:28:43  InnoDB: Waiting for the background threads to start
150106  9:28:44 InnoDB: 1.1.8 started; log sequence number 1595675
150106  9:28:44 [Note] Server hostname (bind-address): '(null)'; port: 3306
150106  9:28:44 [Note]   - '(null)' resolves to '::';
150106  9:28:44 [Note]   - '(null)' resolves to '0.0.0.0';
150106  9:28:44 [Note] Server socket created on IP: '0.0.0.0'.
150106  9:28:44 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

搜索最后一句,找到這樣的結果 http://blog.csdn.net/indexman/article/details/16980433

呃,我用的是windows啊,好像也沒有那些命令

倒是有一個腳本mysql_install_db.pl,但似乎需要用perl來運行(剛找了一下發現在git bash里面有perl,可以試試)

在群里問了,有人提到,data目錄是不能刪的。原來如此,mysql有關鍵文件在里面啊,好難過。找同事的電腦,打開data文件夾,發現目標:

mysqlperformance_schema

復制到data文件夾下面,啟動mysql,OK(中間還有一些小問題搜索下就出來了),困擾了我好久的神奇問題T_T

附上那mysql_install_db.pl的嘗試(先把那兩個目錄移走,再做的試驗)

C:\wamp\bin\mysql\mysql5.5.24>D:\Work\git\PortableGit-1.8.4-preview20130916\bin\perl.exe C:\wamp\bin\mysql\mysql5.5.24\scripts\mysql_install_db.pl --basedir=.
FATAL ERROR: Neither host 'ARLIANG' nor 'localhost' could be looked up with
./bin/resolveip
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option

C:\wamp\bin\mysql\mysql5.5.24>D:\Work\git\PortableGit-1.8.4-preview20130916\bin\perl.exe C:\wamp\bin\mysql\mysq
l5.5.24\scripts\mysql_install_db.pl --basedir=. --force
Installing MySQL system tables...   

那倆文件夾也沒出來,試驗失敗。

那些愛折騰的孩子,再自己搗鼓搗鼓吧。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM