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

标签 mysql wamp

我的 WampServer 2.5 有问题。 MySQL 5.6.16 消耗 500 MB RAM 内存。我没有数据库,全新安装。我在my.ini中设置了table_definition_cache = 400,但这并不能解决问题。这是我的.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

最佳答案

看起来您可能已经看到建议进行此更改的答案并且更改是个好主意,但是:-

您是否安装了 64 位 WAMPServer?

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

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

所以在 my.ini 中将部分名称更改为

# The MySQL server
[wampmysqld64]

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

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

关于mysql - Wamp 服务器 MySQL - 高性能 ~500mb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25484606/

相关文章:

php - wamp上mysql端口3306错误如何解决?

Mysql2::Error: Expression #2 of ORDER BY 子句不在 GROUP BY 子句中并且包含非聚合列

sql - MySQL:为什么使用 UTF-8

php - laravel Eloquent 查询构建器在没有任何逻辑的情况下更新自定义时间戳字段

php - 如何用PHP连接MySQL(WAMP)数据库,并处理错误?

php - 如何使用 ffmpeg-php 从 .3gp 和 .mp4 读取信息?

mysql - 尝试插入 MySQL 表时出现错误字符串值错误

mysql - secure-file-priv 阻止 INTO OUTFILE 命令

html - wamp ssi 不工作

php - 无法将值插入数据库