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...   

那俩文件夹也没出来,试验失败。

那些爱折腾的孩子,再自己捣鼓捣鼓吧。

posted @ 2015-01-06 09:55  Arliang  阅读(4894)  评论(0编辑  收藏  举报