设为首页 加入收藏

TOP

【mysql案例】mysql5.6.14配置my.cnf多实例,mysql_install_db初始化不读取my.cnf配置文件(一)
2014-11-24 15:49:35 】 浏览:136
Tags:mysql 案例 mysql5.6.14 配置 my.cnf 实例 mysql_install_db 初始 读取 文件

1.1.1. mysql5.6.14多实例my.cnf时,初始化不读取my.cnf配置文件

【环境描述】

在多实例配置的/etc/my.cnf环境中,执行mysql_install_db后,启动Mysql报错。

【操作步骤】

/etc/my.cnf配置文件:

[mysqld3307]

innodb_data_file_path =ibdata1:1G:autoextend

初始化数据库

[root@test home]# mysql_install_db--datadir=/home/mysql_3307 --user=mysql --defaults-file=/etc/my.cnf

Installing MySQL system tables...2014-05-1311:07:33 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.Please use --explicit_defaults_for_timestamp server option (see documentationfor more details).

2014-05-13 11:07:33 8897 [Note] InnoDB: TheInnoDB memory heap is disabled

2014-05-13 11:07:33 8897 [Note] InnoDB:Mutexes and rw_locks use GCC atomic builtins

2014-05-13 11:07:33 8897 [Note] InnoDB:Compressed tables use zlib 1.2.3

2014-05-13 11:07:33 8897 [Note] InnoDB:Using Linux native AIO

2014-05-13 11:07:33 8897 [Note] InnoDB:Using CPU crc32 instructions

2014-05-13 11:07:34 8897 [Note] InnoDB:Initializing buffer pool, size = 128.0M

2014-05-13 11:07:34 8897 [Note] InnoDB:Completed initialization of buffer pool

2014-05-13 11:07:34 8897 [Note] InnoDB: Thefirst specified data file ./ibdata1 did not exist: a new database to becreated!

2014-05-13 11:07:34 8897 [Note] InnoDB:Setting file ./ibdata1 size to 12 MB

2014-05-13 11:07:34 8897 [Note] InnoDB:Database physically writes the file full: wait...

2014-05-13 11:07:34 8897 [Note] InnoDB:Setting log file ./ib_logfile101 size to 48 MB

2014-05-13 11:07:34 8897 [Note] InnoDB:Setting log file ./ib_logfile1 size to 48 MB

2014-05-13 11:07:35 8897 [Note] InnoDB:Renaming log file ./ib_logfile101 to ./ib_logfile0

2014-05-13 11:07:35 8897 [Warning] InnoDB:New log files created, LSN=45781

2014-05-13 11:07:35 8897 [Note] InnoDB:Doublewrite buffer not found: creating new

2014-05-13 11:07:35 8897 [Note] InnoDB:Doublewrite buffer created

启动mysql实例时,error.log报错:

2014-05-13 11:11:15 8989 [Note] InnoDB:Completed initialization of buffer pool

2014-05-13 11:11:15 8989 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a differentsize 768 pages (rounded down to MB) than specified in the .cnf file: initial65536 pages, max 0 (relevant if non-zero) pages!

2014-05-13 11:11:15 8989 [ERROR] InnoDB:Could not open or create the system tablespace. If you tried to add new datafiles to the system tablespace, and it failed he

re, you should now editinnodb_data_file_path in my.cnf back to what it was, and remove the new ibdatafiles InnoDB created in this failed attempt. InnoDB only wrote

those files full of zeros, but did not yetuse them in any way. But be careful: do not remove old data files which containyour precious data!

2014-05-13 11:11:15 8989 [ERROR] Plugin'InnoDB' init function returned error.

2014-05-13 11:11:15 8989 [ERROR] Plugin'InnoDB' registration as a STORAGE ENGINE failed.

2014-05-13 11:11:15 8989 [ERROR]Unknown/unsupported storage engine: InnoDB

2014-05-13 11:11:15 8989 [ERROR] Aborting

2014-05-13 11:11:15 8989 [Note] Binlog end

2014-05-13 11:11:15 8989 [Note] Shuttingdown plugin 'partition'

2014-05-13 11:11:15 8989 [Note] Shuttingdown plugin 'ARCHIVE'

虽然执行mysql_install_db命令的时候指定了读取/etc/my.cnf配置文件,但是进行初始化创建数据库的时候,实际上没有读取:

初始化时的输出日志:

2014-05-13 11:07:34 8897 [Note] InnoDB:Setting file ./ibdata1 size to 12 MB

查看/home/mysql_3307/ibdata1的大小:

[root@ test mysql_3307]# ls -ltrh |grep ibdata1

-rw-rw---- 1 mysql mysql 12M May 13 11:07 ibdata1

可以发现实际创建的ibdata1文件大小也是mysql默认

首页 上一页 1 2 下一页 尾页 1/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇解决mysql中共8小时空闲后连接超.. 下一篇Mysql SELECT FOR UPDATE

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目