Windows 平台上的 InnoDB

来源:互联网 发布:华为成都研究所云计算 编辑:程序博客网 时间:2024/05/08 07:09

出错详解:

E:/LAMP/mysql/bin>mysqld-max-nt --standalone --console
InnoDB: Error: you must set the log group home dir in my.cnf the
InnoDB: same as log arch dir.
020410 23:52:53 Can't init databases
解释:两个目录必须相同!


E:/LAMP/mysql/bin>mysqld-max-nt --standalone --console
InnoDB: Operating system error number 3 in a file operation.
InnoDB: See http://www.innodb.com/ibman.html for installation help.
InnoDB: The error means the system cannot find the path specified.
InnoDB: In installation you must create directories yourself, InnoDB
InnoDB: does not create them.
InnoDB: File name d:/data/mysqldbf/ibdata/ibdata1
InnoDB: Cannot continue operation.
解释:目录没有建立,必须手工用 mkdir 先!



E:/LAMP/mysql/bin>mysqld-max-nt --standalone --console
InnoDB: The first specified data file d:/data/mysqldbf/ibdata/ibdata1 did not ex
ist:
InnoDB: a new database to be created!
020410 23:54:44 InnoDB: Setting file d:/data/mysqldbf/ibdata/ibdata1 size to 30
0 MB
InnoDB: Database physically writes the file full: wait...
020410 23:55:11 InnoDB: Log file c:/iblogs/ib_logfile0 did not exist: new to be
created
InnoDB: Setting log file c:/iblogs/ib_logfile0 size to 30 MB
InnoDB: Database physically writes the file full: wait...
020410 23:55:14 InnoDB: Log file c:/iblogs/ib_logfile1 did not exist: new to be
created
InnoDB: Setting log file c:/iblogs/ib_logfile1 size to 30 MB
InnoDB: Database physically writes the file full: wait...
020410 23:55:17 InnoDB: Log file c:/iblogs/ib_logfile2 did not exist: new to be
created
InnoDB: Setting log file c:/iblogs/ib_logfile2 size to 30 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
020410 23:55:27 InnoDB: Started
020410 23:55:28 mysqld-max-nt: Table 'mysql.func' doesn't exist
020410 23:55:28 Can't open mysql/func table
mysqld-max-nt: ready for connections

解释:成功了!

把原先的 MyISAM 表全部转换成了 InnoDB :
1.mysqldump --opt dbname>dbname.sql
2.mysqladmin drop dbname
3.mysqladmin create dbname
4.修改 dbname.sql ,首行加
set autocommit=0;
末行加
commit;
并把所有的 type=myisam 修改为 type=innodb 。
5.mysql dbname < dbname.sql
6.重新建立相关的索引,以提高性能。

原创粉丝点击