不晓得是不是电脑装了什么软件出现冲突了还是怎么回事,我电脑上的mysql突然不能用了,服务中显示mysql已经启动,但是无法登陆。重新启动mysql服务一直报1067错误,按照网上的办法调了一下午都没有成功,修改my.ini文件,查看端口占用情况等等之类的都试了。有种方法说添加ip地址,但是我的3306端口没有被监听,在dos环境下也无法使用命令连接到主机的3306端口。查看错误日志开始说Table ‘mysql.host’ doesn’t exist,后来按照一种方法把三个生成文件删掉后,还是无法启动,错误也换成
InnoDB:Database was not shut down normally!
InnoDB:String an apply batch of log records to the database
InnoDB:Started;log sequence number 0 43655等之类的信息,每次启动都是同样的报错。
    后来没办法给卸载了。但是今天晚上重装的时候,一直在最后一步,start service这个地方过不去,网上所说的卸载不干净,我试过几种卸载方式,整个C盘中凡是带有mysql字眼的文件都删掉了,注册表之类的我都清理过,端口也换过,名称换过,安装路径换过,关防火墙IIS之类我都试过了,都无法成功安装。查看端口信息也没有占用。重装了一个晚上了就差重装系统了。
    马上准备找工作了,最近想把之前的一些项目重新温习一遍,一开始系统就出了问题,分不多了,还烦请各位高手指点啊。小弟不甚感激!!!!!!

解决方案 »

  1.   

     在你从电脑里卸载旧的MYSQL数据库服务时,首先先在WINDOWS服务里停掉MYSQL的服务。再到控制面板里的增加删除程序内进行删除,但是你并不能完整的把MYSQL服务删除,那么就要在注册表里(regedit)清除你的MYSQL服务。有几个地方:
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL 目录删除;
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL 目录删除;
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL 目录删除; 
    试过这个 可以卸载干净.
      

  2.   

    你说的这种方式我试过了,没用
    我除了把你所说的三个位置删除之外,还使用ctrl+f,F3循环搜索将注册表了所有与mysql相关的项都给删除掉了,还是不行。
      

  3.   

    贴一下MYSQL的错误日志以供分析。
      

  4.   

    其中有一回报这个错
    Default storage engine (InnoDB) is not available
    按照网上的办法将ib_logfile0,ib_logfile1,ibdata1这三文件给删掉后,可以启动mysql服务,但是再重新启动就报1067错误,我使用navicat也无法连接上数据库。之后重启服务就一直报这个错了。
    120909 10:50:49  InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    120909 10:50:49  InnoDB: Starting log scan based on checkpoint at
    InnoDB: log sequence number 0 36808.
    InnoDB: Doing recovery: scanned up to log sequence number 0 43655
    120909 10:50:49  InnoDB: Starting an apply batch of log records to the database...
    InnoDB: Progress in percents: 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
    InnoDB: Apply batch completed
    120909 10:50:50  InnoDB: Started; log sequence number 0 43655
    InnoDB: The first specified data file .\ibdata1 did not exist:
    InnoDB: a new database to be created!
    120909 10:51:54  InnoDB: Setting file .\ibdata1 size to 10 MB
    InnoDB: Database physically writes the file full: wait...
    120909 10:51:54  InnoDB: Log file .\ib_logfile0 did not exist: new to be created
    InnoDB: Setting log file .\ib_logfile0 size to 16 MB
    InnoDB: Database physically writes the file full: wait...
    120909 10:51:54  InnoDB: Log file .\ib_logfile1 did not exist: new to be created
    InnoDB: Setting log file .\ib_logfile1 size to 16 MB
    InnoDB: Database physically writes the file full: wait...
    InnoDB: Doublewrite buffer not found: creating new
    InnoDB: Doublewrite buffer created
    InnoDB: Creating foreign key constraint system tables
    InnoDB: Foreign key constraint system tables created
    120909 10:51:55  InnoDB: Started; log sequence number 0 0
    谢谢
      

  5.   

    如4楼贴出的错误日志,我在网上找了Database was not shut down normally!相关的信息
    有提出在bin目录下执行mysqladmin shut down -uroot -p,但是我的计算机在滴的一声之后出现 connect to server at 'localhost' failed ,继续执行telnet localhost 3306,提示不能打开到主机的连接,在端口:3306连接失败。使用netstat -ano命令之后并没有看到3306端口的任何信息,也没有被监听之类的。
      

  6.   

    不知道这个你试过没有?
    http://www.cnblogs.com/85538649/archive/2011/08/03/2126171.html
    上次我也出现和楼主一样的情况,在启动服务的时候卡住不动。按照这上面的情况轻松解决问题