今天在03 Server 上安装MySQL 5.4.1时,MySQL Installation Wizard报 ended prematurely。试了另外一个5.1的版本,同样的问题。以前这个系统有装过MySQL的,是不是没卸载干净,于是将注册表里所有关于MySQL的全删除了。再试,问题没有解决。只能到官网下载手动安装版了。
- 将下载的uninstall package解压到C:/mysql-5.4.1-beta-win32.
- 创建配置文件my.ini。(My recommendation here is direclty copy this file from user mysql server and change a little bit.)
- 直接启动:mysqld --console (这个会输出信息到console window上,方便查看错误信息。)
如果遇到以下错误:
Plugin 'InnoDB' init function returned error.
Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Unknown/unsupported table type : INNODB
直接把data目录下的ibdata 以及ib_logfile0、ib_logfile1删掉再启动。 - 注册成windows服务
>C:/mysql-5.4.1-beta-win32/bin/mysqld --install
(这里必需使用全路径,不然启动服务时会提示找不到路径。如果想删除服务 --remove) - 启动服务
>net start mysql