Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

MySQL My.ini优化问题。

[复制链接]
wxfly 发表于 2006-3-10 03:32:14 | 显示全部楼层 |阅读模式
主机系统 Win2003 + IIS 6 + MySQL 4.1.3-nt + PHP 4.4.0

运行正常,就是Discuz!论坛速度很慢,而ASP就很快,因此对MySQL进行优化。

却发现一个问题,只要在 my.ini 里打开 skip-innodb 参数,MySQL就无法启动。提示 错误1067,进程意外终止。

就算偶尔能启动起来,Discuz!的论坛也无法打开,提示无法打开数据库表。


而官方网站(Discuz!4.1.0手册)优化说明里,明确说明,建议打开此项,可大大提升运行效率,可是我的主机就是无法打开此选项。

看别人的却没有此问题,不知道我的主机为何不能打开此选项?

请高手指教。不胜感激。

以下是 my.ini 文件内容:

════════════════════════════════════
[client]

port=3306
default-character-set=latin1

[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306

#skip-innodb            (此项死活无法打开,只要打开,MySQL就无法启动)
skip-bdb
skip-locking
skip-name-resolve

max_connections = 500
key_buffer = 256M
max_allowed_packet = 2M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
tmp_table_size = 32M
thread_cache_size = 8
thread_cache = 8
query_cache_size = 16M
thread_concurrency = 2

wait_timeout = 5

# join_buffer_size=16M
# record_buffer=16M
#myisam_max_sort_file_size=100G
#myisam_max_extra_sort_file_size=100G

#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files/MySQL/MySQL Server 4.1/"

#Path to the database root
datadir="D:/MySQL Datafiles/"

# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=latin1

# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB



#*** INNODB Specific options ***
innodb_data_home_dir="D:/MySQL Datafiles/"

# 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=2M

# 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=1

# 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=1M

# 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.
innodb_buffer_pool_size=17M

# 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=10M

# 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=8


=====================================================




.....

[ 本帖最后由 wxfly 于 2006-3-10 14:16 编辑 ]
 楼主| wxfly 发表于 2006-3-10 14:15:22 | 显示全部楼层
请高手帮忙哦。。
回复

使用道具 举报

新水年华 发表于 2006-12-5 00:13:18 | 显示全部楼层
我也有这个问题
回复

使用道具 举报

wuhaolong 发表于 2006-12-5 11:25:06 | 显示全部楼层
我米试过,去试一下...
回复

使用道具 举报

antdk 发表于 2006-12-6 14:46:23 | 显示全部楼层
现在还用这么低的版本,换了。
回复

使用道具 举报

默默 发表于 2006-12-6 14:47:40 | 显示全部楼层
试一下5.0吧
回复

使用道具 举报

w00_008 发表于 2006-12-6 18:02:57 | 显示全部楼层

注释掉:skip-name-resolve 就可以了

注释掉:skip-name-resolve 就可以了,可能是因为需要DNS解析,我以前也踫到过这种问题就是这样解决的。

[ 本帖最后由 w00_008 于 2006-12-6 18:04 编辑 ]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-1-11 08:57 , Processed in 0.032556 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表