Wamp服务器MySQL - 高性能~500mb

时间:2014-08-25 11:11:53

标签: mysql wamp

我的WampServer 2.5出了问题。 MySQL 5.6.16消耗500 MB的RAM内存。我没有数据库,全新安装。我在table_definition_cache = 400中设置了my.ini,但这并没有解决问题。这是my.ini

[client]
#password   = your_password
port        = 3306
socket      = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[wampmysqld]
port        = 3306
socket      = /tmp/mysql.sock
key_buffer_size = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
table_definition_cache = 400
performance_schema=off
basedir=c:/wamp/bin/mysql/mysql5.6.17
log-error=c:/wamp/logs/mysql.log
datadir=c:/wamp/bin/mysql/mysql5.6.17/data

lc-messages-dir=c:/wamp/bin/mysql/mysql5.6.17/share

# Change your locale here !
lc-messages=fr_FR

# Avoid warning
explicit_defaults_for_timestamp = TRUE
# Disable Federated by default
skip-federated

# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin

# binary logging format - mixed recommended
binlog_format=mixed

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id   = 1

# Replication Slave (comment out master section to use this)


# New for MySQL 5.6 if no slave
skip-slave-start


# Point the following paths to different dedicated disks
#tmpdir     = /tmp/     
#log-update     = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C:\mysql\data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:\mysql\data/
#innodb_log_arch_dir = C:\mysql\data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld]
port=3306
explicit_defaults_for_timestamp = TRUE

1 个答案:

答案 0 :(得分:6)

看起来您可能已经看到了一个答案,表明这种变化并且改变是一个好主意,但是: -

您安装了64位WAMPServer吗?

如果你这样做,那么在64位版本的WAMPServer上测试时会出现一个小错误。

在64位版本的WAMPServer中,MySQL服务的名称已更改为wampmysqld64,但他们忘记更改my.ini文件中的部分名称。

因此在my.ini中将部分名称更改为

# The MySQL server
[wampmysqld64]

MySQL的工作方式是查看自己的服务名称,然后在符合其服务名称的部分标题下查看my.ini的配置设置。

这应该让MySQL注意你的配置更改。