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

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

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

  • 相关阅读:
    mybatis学习$与#号取值区别
    java学习
    mybatis学习
    spring mvc 数据校验(bean实体注解实现)
    maven学习
    java.lang.ClassNotFoundException: org.springframework.web.util.WebAppRootListener
    20180804 excel规划求解。。。
    java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
    mybatis config 配置设置说明
    进程状态以及状态转换
  • 原文地址:https://www.cnblogs.com/arliang/p/after_deleted_data_dir_of_mysql_in_windows.html
Copyright © 2011-2022 走看看