读书人

my.cnf 无法设置 ft_min_word_len q

发布时间: 2012-03-11 18:15:39 作者: rapoo

my.cnf 无法设置 ft_min_word_len, query cache size
CENTOS5.5+mysql5.5.19

my.cnf 无法设置 ft_min_word_len=2 和 query cache size,求教大家。
下面是我的 my.cnf设置

[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 16M
max_connections = 1024
wait_timeout = 5
table_open_cache = 512
sort_buffer_size = 4M
read_buffer_size = 2M
read_rnd_buffer_size = 2M
myisam_sort_buffer_size = 256M
thread_cache_size = 8
query_catch_limit=2M
query_cache_size = 128M
ft_min_word_len=2
ft_max_word_len=40
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
read_rnd_buffer_size=2M
tmp_table_size=128M


设置完后重启 sevice mysqld restart, php myadmin 里查看:

ft max word len84
ft min word len4
... ...
query cache min res unit4,096
query cache size0
query cache typeON

ft min word len还是 4, query cache size 也显示为 0。


mysql 日志如下

/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
120124 16:42:11 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120124 16:42:11 InnoDB: The InnoDB memory heap is disabled
120124 16:42:11 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
120124 16:42:11 InnoDB: Compressed tables use zlib 1.2.3
120124 16:42:11 InnoDB: Initializing buffer pool, size = 128.0M
120124 16:42:11 InnoDB: Completed initialization of buffer pool
120124 16:42:11 InnoDB: highest supported file format is Barracuda.
120124 16:42:11 InnoDB: Waiting for the background threads to start
120124 16:42:12 InnoDB: 1.1.8 started; log sequence number 1595675
120124 16:42:12 [ERROR] /usr/local/mysql/bin/mysqld: unknown variable 'default-character-set=utf8'
120124 16:42:12 [ERROR] Aborting
120124 16:42:12 InnoDB: Starting shutdown...
120124 16:42:12 InnoDB: Shutdown completed; log sequence number 1595675
120124 16:42:12 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete



另外: mysql启动时显示
Shutting down MySQL...... SUCCESS!
Starting MySQL.. SUCCESS!

记得以前 机器重装前好像是

Shutting down MySQL...... [OK]
Starting MySQL.. [OK]



[解决办法]
你的的my.cnf 文件在哪个目录下?另外检查一下你的mysqld运行时带的命令参数是什么?怀疑你的MYSQL用的不是你所改的那个my.cnf

读书人网 >Mysql

热点推荐