装完Mysql后,如果启动Mysql时,报错如下
CODE:
H:\mysql\bin>net start mysql
MySql 服务正在启动 .
MySql 服务无法启动。
系统出错。
发生系统错误 1067。
进程意外终止。
请执行以下命令
CODE:
H:\mysql\bin>mysqld-nt --defaults-file=h:\windows\my.ini --standalone --console
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
061109 9:51:52 InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
061109 9:51:52 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
061109 9:51:53 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 5 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
061109 9:51:56 InnoDB: Started
mysqld-nt: ready for connections.
Version: '4.0.26-nt' socket: '' port: 3306 Official MySQL binary
就可以了,原因是Mysql数据库服务器未初始化。
附my.ini,一般装完都会自动生成在系统盘:\winnt(或windows)\下
CODE:
#This File was made using the WinMySQLAdmin 1.4 Tool
#2006-11-09 09:39:52
#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions
[mysqld]
basedir=H:/mysql
#bind-address=192.168.1.179
datadir=H:/mysql/data
#language=H:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=H:/mysql/bin/mysqld-nt.exe
user=root
password=
[Client]
user=root
password=
