The innodb_system data file ‘./ibdata1‘ is of a different size 12800 pages

修改完my.cnf,mysql启动不了

查看日志发现

2021-11-09T05:16:20.814620Z mysqld_safe Logging to '/log/3306/db-error.err'.
2021-11-09T05:16:20.861140Z mysqld_safe Starting mysqld daemon with databases from /mysql/data/3306/data
2021-11-09T05:16:20.876861Z 0 [Warning] Could not increase number of max_open_files to more than 1024 (request: 65536)
2021-11-09T05:16:20.876947Z 0 [Warning] Changed limits: max_connections: 214 (requested 800)
2021-11-09T05:16:20.876952Z 0 [Warning] Changed limits: table_open_cache: 400 (requested 2000)
2021-11-09T05:16:21.212285Z 0 [Warning] option 'max_binlog_size': unsigned value 2147483648 adjusted to 1073741824
2021-11-09T05:16:21.212610-00:00 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2021-11-09T05:16:21.212663-00:00 0 [Note] /app/mysql/bin/mysqld (mysqld 5.7.22-log) starting as process 23536 ...
2021-11-09T05:16:21.222147-00:00 0 [Warning] InnoDB: innodb_open_files should not be greater than the open_files_limit.

2021-11-09T05:16:21.222244-00:00 0 [Note] InnoDB: PUNCH HOLE support available
2021-11-09T05:16:21.222277-00:00 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-11-09T05:16:21.222289-00:00 0 [Note] InnoDB: Uses event mutexes
2021-11-09T05:16:21.222300-00:00 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2021-11-09T05:16:21.222310-00:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2021-11-09T05:16:21.222320-00:00 0 [Note] InnoDB: Using Linux native AIO
2021-11-09T05:16:21.222345-00:00 0 [Note] InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB
2021-11-09T05:16:21.222771-00:00 0 [Note] InnoDB: Number of pools: 1
2021-11-09T05:16:21.222923-00:00 0 [Note] InnoDB: Using CPU crc32 instructions
2021-11-09T05:16:21.224896-00:00 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
2021-11-09T05:16:21.248092-00:00 0 [Note] InnoDB: Completed initialization of buffer pool
2021-11-09T05:16:21.252462-00:00 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-11-09T05:16:21.262977-00:00 0 [ERROR] InnoDB: The innodb_system data file './ibdata1' is of a different size 12800 pages (rounded down to MB) than the 32000 pages specified in the .cnf file!
2021-11-09T05:16:21.263011-00:00 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-11-09T05:16:21.865525-00:00 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-11-09T05:16:21.865614-00:00 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-11-09T05:16:21.865639-00:00 0 [ERROR] Failed to initialize builtin plugins.
2021-11-09T05:16:21.865655-00:00 0 [ERROR] Aborting


关注这一行报错

InnoDB: The innodb_system data file './ibdata1' is of a different size 12800 pages (rounded down to MB) than the 32000 pages specified in the .cnf file!

经分析,是innodb_data_file_path=ibdata1设置问题

改回原来的值就行,到底改成多少呢?
答案是12800 pages

能否具体?
答案是肯定的

大家都知道,mysql的最小单元是page,1个pages为16k。
12800 pages 就是12800*16=204800KB=200MB

my.cnf
#修改成
innodb_data_file_path=ibdata1:200M

你学会了嘛??评论区告诉我

对mysql感兴趣的,欢迎加入QQ群:744253964,一起成长!~~~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值