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

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

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

  • 相关阅读:
    前端代码异常日志收集与监控
    基于window.onerror事件 建立前端错误日志
    MySQL数据类型和常用字段属性总结
    MySQL中char(36)被认为是GUID导致的BUG及解决方案
    dl,dt,dd,ul,li,ol区别
    泛型
    EF里Guid类型数据的自增长、时间戳和复杂类型的用法
    EF里的默认映射以及如何使用Data Annotations和Fluent API配置数据库的映射
    EF里的继承映射关系TPH、TPT和TPC的讲解以及一些具体的例子
    SQL JOIN
  • 原文地址:https://www.cnblogs.com/arliang/p/after_deleted_data_dir_of_mysql_in_windows.html
Copyright © 2020-2023  润新知