120827 14:08:19 [Note] Plugin 'FEDERATED' is disabled.
120827 14:08:19 InnoDB: The InnoDB memory heap is disabled
120827 14:08:19 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120827 14:08:19 InnoDB: Compressed tables use zlib 1.2.3
120827 14:08:19 InnoDB: Initializing buffer pool, size = 4.0G
120827 14:08:20 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 56623104 bytes
InnoDB: than specified in the .cnf file 0 268435456 bytes!
120827 14:08:20 [ERROR] Plugin 'InnoDB' init function returned error.
120827 14:08:20 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120827 14:08:20 [ERROR] Unknown/unsupported storage engine: INNODB
120827 14:08:20 [ERROR] Aborting120827 14:08:20 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Shutdown complete
我的my.ini配置如下,我的电脑是64bit win7
#*** INNODB Specific options ***
# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
#skip-innodb# Additional memory pool that is used by InnoDB to store metadata
# information.  If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS.  As this is fast enough on most
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
innodb_additional_mem_pool_size=20M# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit=2# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
innodb_log_buffer_size=4M# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system.  Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
# memlock
innodb_buffer_pool_size=4G# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.innodb_log_file_size=256M
# innodb_log_files_in_group = 2# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency=10
innodb_lock_wait_timeout=500

解决方案 »

  1.   

    我的mysql启动不了。请问什么原因。不要告诉我是这个原因:1.先停止 mysql 服务;
    2.然后在数据库目录删除 ib_logfile0 和 ib_logfile1 两个文件,这两个文件的大小和 innodb_log_file_size 设的值是一样大小的;
    3.设置 innodb_log_file_size 值;
    4.重启 mysql 服务,会自动创建这两个文件。把 innodb_log_file_size 适当调大后,网站访问速度明显加快。初始值是10M,我分别尝试了三个值,64M,32M,128M,发现在这台 vps 上设为 32M 时性能最佳。注意:如果只修改 innodb_log_file_size 的值,而没有删除 ib_logfile0 和 ib_logfile1 两个文件,则无法重启 mysql 服务,会报错:
    在 本地计算机 无法启动 MySQL 服务。
    错误 1067: 进程意外终止。因为我根本找不到, ib_logfile0 和 ib_logfile1 
      

  2.   


    补充:
    [sql]innodb_log_file_size=54M[/sql]
    修改为:
    innodb_log_file_size=256M
    就出错。
      

  3.   

    修改肯定要报错,因为修改必须删除原有的ib_logfile
    搜一下整个硬盘看看
      

  4.   


    太恐怖了。win7给设置为隐藏了。我把系统文件设置出来。
    找到了。C:\ProgramData\MySQL\MySQL Server 5.5\data
    多谢哈。因为我之前。搜索过。但是,看你给的建议我又从新做了一次。OK