未知的表引擎“InnoDB”错误

当我启动我的MySQL时,它会在日志文件上给出以下错误。 我的默认引擎是MyIsam,我只使用Innodb作为一组数据库。

120604 12:24:49 mysqld_safe mysqld from pid file /var/lib/mysql/mysql1.pid1 ended 120604 12:24:58 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 120604 12:24:58 [ERROR] InnoDB: syntax error in innodb_data_file_path 120604 12:24:58 [ERROR] Plugin 'InnoDB' init function returned error. 120604 12:24:58 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 120604 12:24:58 [Note] Event Scheduler: Loaded 0 events 120604 12:24:58 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.1.35-community-log' socket: '/var/lib/mysql/mysql.sock1' port: 3306 MySQL Community Server (GPL) 

下面是InnoDB表,它给出了未知的表引擎'InnoDB'的错误?

 mysql (mydb) > show create table sitemap; ERROR 1286 (42000): Unknown table engine 'InnoDB' 

我my.cnf是:

 [mysqld] socket = /var/lib/mysql/mysql.sock1 port = <port> bind-address = <ip> pid-file = /var/lib/mysql/mysql1.pid1 datadir = /var/lib/mysql user = mysql log-error = /var/lib/mysql/err.log log-bin=Master-mysql-bin server-id = 1 ft_min_word_len = 2 skip-show-database innodb_data_home_dir = /var/lib/mysql innodb_data_file_path=ibdata1:194.19922M:autoextend 

我没有看到这个错误,但我可以从错误日志:

 120604 12:24:58 [ERROR] InnoDB: syntax error in innodb_data_file_path 120604 12:24:58 [ERROR] Plugin 'InnoDB' init function returned error. 120604 12:24:58 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 

应该很清楚,在你的configuration中,你在innodb_data_file_path值中有一个问题。 你可以尝试评论它,并重新启动MySQL。 如果成功,您可以尝试为此选项find合适的值。

在my.cnf中,我看到以下内容:

 innodb_data_file_path=ibdata1:194.19922M:autoextend 

数字中有一个小数点:194.19922

请围绕它到194,并将其更改为

 innodb_data_file_path=ibdata1:194M:autoextend 

并重新启动mysql