mysql启动错误1067

今天在重新安装mysql服务的时候遇到如下错误:

C:\Program Files\MySQL\MySQL Server 4.1\bin>mysqld-nt --remove
Service successfully removed.

C:\Program Files\MySQL\MySQL Server 4.1\bin>mysqld-nt --install
Service successfully installed.

C:\Program Files\MySQL\MySQL Server 4.1\bin>net start mysql
The MySQL service is starting.
The MySQL service could not be started.

A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

发现一种最简单的方法:把mysql目录下的my.ini copy到C:\WINDOWS中,再重新安装服务问题解决:

C:\Program Files\MySQL\MySQL Server 4.1>copy my.ini c:\WINDOWS\
        1 file(s) copied.

C:\Program Files\MySQL\MySQL Server 4.1>mysqld-nt --remove
Service successfully removed.

C:\Program Files\MySQL\MySQL Server 4.1>mysqld-nt --install
Service successfully installed.

C:\Program Files\MySQL\MySQL Server 4.1>net start mysql
The MySQL service is starting.
The MySQL service was started successfully.

网上有人给出了另外一个解决方法,比较麻烦,相信也是可行的:

把mysql目录copy到c:\mysql
copy my.ini到C:\WINDOWS目录
修改my.ini中basedir和datadir参数
重新install mysql service

谁不嫌麻烦可以试一下。