zoukankan      html  css  js  c++  java
  • 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:wampinmysqlmysql5.5.24>D:WorkgitPortableGit-1.8.4-preview20130916inperl.exe C:wampinmysqlmysql5.5.24scriptsmysql_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:wampinmysqlmysql5.5.24>D:WorkgitPortableGit-1.8.4-preview20130916inperl.exe C:wampinmysqlmysq
    l5.5.24scriptsmysql_install_db.pl --basedir=. --force
    Installing MySQL system tables...   
    

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

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

  • 相关阅读:
    js 字符中 带 函数 再传对象参数
    window server 2012 II8 假陌生 碰到的问题
    IIS 下载文件 报错“401
    easyui使用时出现这个Uncaught TypeError: Cannot read property 'combo' of undefined
    eclipse+gnuarm+使用报错
    mini2440:通过JLink烧写BootLoader到Nor Flash
    在Linux中搭建一个FTP服务器
    SPFA模板
    Bellman_ford模板
    前向星&链式前向星
  • 原文地址:https://www.cnblogs.com/arliang/p/after_deleted_data_dir_of_mysql_in_windows.html
Copyright © 2011-2022 走看看