Do I need the text “_size” in the my.cnf file for mysql 5.1?

十年热恋 提交于 2019-12-12 01:32:56

问题


This is a pretty simple question about setting parameters in the my.cnf file for mysql 5.1.

This page gives me the parameters I can tune: http://dev.mysql.com/doc/refman/5.0/en/server-parameters.html and so I think I would need to write

key_buffer_size = 256M

But when I open my current my.cnf, it has the line:

key_buffer = 16M

My question is, do I need "key_buffer_size" or "key_buffer" or does it not matter which I use? And, how would I know if something in the my.cnf is incorrect? Where's the daemon start log file?

I am running ubuntu; I think version 8.04 LTS


回答1:


The key_buffer key is deprecated.

The key_buffer_size should be used instead.

The old deprecated key existing in the configurations seems to be a bug: default my.cnf has deprecated option key_buffer.

$ mysqld --help

[Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead

The key_buffer keys seems to have been deprecated for a long time. For example, key_buffer_size has been in use all the way back as far as 4.1.

The only mention of this deprecation in the MySQL documentation, that I could find, is a reference here in the 5.7 Release Notes.




回答2:


Both MySQL 5.1 and 5.0 server parameter specification says "KEY_BUFFER_SIZE":

MySQL 5.0 | MySQL 5.1



来源:https://stackoverflow.com/questions/2664025/do-i-need-the-text-size-in-the-my-cnf-file-for-mysql-5-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!