1,查看Mysqld(/var/log/mysqld.log)日志,发现以下错误:
InnoDB: Error: log file /usr/local/mysql/data/ib_logfile0 is of different size 0
5242880 bytes
InnoDB: than specified in the .cnf file 0 104857600 bytes!
030826 1:42:15 Can't init databases
030826 1:42:15 Aborting
2,解决办法
"
If you want to change the number or the size of your InnoDB log files, you
have to shut down MySQL and make sure that it shuts down without errors.
Then copy the old log files into a safe place just in case something went
wrong in the shutdown and you will need them to recover the database. Delete
then the old log files from the log file directory, edit my.cnf, and start
MySQL again. InnoDB will tell you at the startup that it is creating new log
files.
"
在你修改my.cnf的innodb_log_file_size参数前,请先停止mysql服务程序的运行(mysql的停止没有出现任何错误),并把/var/lib/mysql目录下的ib_logfile0、ib_logfile1、ib_logfile2等之类的文件移除到一个安全的地方(旧日志文件的保留是为了防止意外的出现),以便Mysql重启后可以将新的ib_logfile0之类日志文件生成到/var/lib/mysql目录下。如果没有什么意外,旧的日志文件可以删除。
分享到:
相关推荐
mysql 有关“InnoDB Error ib_logfile0 of different size”错误的解决方法,需要的朋友可以参考下。
Mysql可以正常启动,但innodb的表无法使用 在错误日志里你会看到如下输出: InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes 现在需要做的事情就是把原来的 innodb 的ib_logfile×...
innodb_data_file_path用来指定innodb tablespace文件,如果我们不在My.cnf文件中指定innodb_data_home_dir和innodb_data_file_path那么默认会在datadir目录下创建ibdata1 作为innodb tablespace。 说明 在测试环境...
内容包括: 1.MySQL的Innodb引擎配置 1.如何配置MySQL服务器的最大连接数量 2.如何配置innodb_open_files,table_open_cache,innodb_file_io_threads和innodb_buffer_pool_size,innodb_log_file_size
[root@localhost ~]# vim /etc/my.cnf 1>#skip-networking这个...6> innodb_log_group_home_dir = /usr/local/mysql/var/ 7> innodb_buffer_pool_size = 128M共享表空间,表数据,索引存放之地,可以分配内存的50%~80%
mysql 5.6 新特性 innodb
file="ADMIN-PC-slow.log" long_query_time=10 lower_case_table_names=1 log-error="ADMIN-PC.err" secure-file-priv="c:/ProgramData/MySQL/MySQL Server 5.7/Uploads" user=mysql innodb_buffer_pool_size=2G ...
py_innodb_page_info工具为《INNODB存储引擎》作者姜承尧写的。 该工具用来分析表空间中的各页得类型和信息,用python编写。 网上多是python2版本的,这里给出python3版本的。
MySQL技术InnoDB存储引擎_姜承尧_第2版
使用py_innodb_page_info 查看分析各种log以及data file,深入研究mysql的存储引擎底层原理与实现。 mysql innodb undo redo
MySQL Innodb 参数详解与优化实践
浅析在线调整 innodb_buffer_pool_size 作者:zhou mysql版本:5.7 先介绍一下 buffer pool: 在innodb存储引擎中数据访问以page为单位,page也是innodb管理数据库的最小磁盘单位,每个page的默认大小为16KB(可以通过...
主要介绍了MySQL启动报错问题InnoDB:Unable to lock/ibdata1 error,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
mysql 存储引擎 innodb 日志结构 非常好用,欢迎大家下载!
可以看到,只有1才能真正地保证事务的持久性,但是由于刷新操作 fsync() 是阻塞的,直到完成后才返回,我们知道写磁盘的速度是很慢的,因此 MySQL 的性能
使用py_innodb_page_info 查看分析各种log以及data file,深入研究mysql的存储引擎底层原理与实现
《mysql技术内幕-InnoDB存储引擎》中使用的页分析工具类py_innodb_page_info