At 18:22 +0100 1/10/03, Blaster wrote:
Happy as I was, I pulled out a test box, installed Linux Debian on it, downloaded MySQL 4 on it, everything worked smooth, now I wanted to enable
the cache feature, but it didn't let me! I want the change to be permanent, so I looked up the doc pages at mysql.com, and found info about the
/etc/my.cnf file, which I created and put in:

[mysqld]
set-variable = query_cache_size = 67108864

The MySQL deamon was restarted, but when I checked the run-time variables with SHOW STATUS, query_cache_size was still set to 0? I even tried
That's odd, since it's SHOW VARIABLES that displays query_cache_size.
SHOW STATUS displays the Qcache_% variables.  But anyway, the syntax
looks okay; I use a similar line on my laptop:

set-variable = query_cache_size=1M

(1M = 1 megabyte)

rebooting the entire machine after the changes to my.cnf, but it wouldn't work -- as if MySQL ignored my file? Now, I was thinking, either MySQL
reads the setting from somewhere else in my system, but since I cannot find a "config file" variable in SHOW STATUS, I cannot find out from where?
Another possibility is that it does read it, but for some reason ignores it, or even worse, reads a 2nd config file and the setting is overriden?
Possibly.  mysqld --help will show you the option files that it reads,
and mysqld --print-defaults will show you the option settings that it's
picking up from option files.


Now, this was quite odd I thought, so I tried to set the cache manually with a query,

"SET GLOBAL query_cache_size=67108864"

and that worked like a charm, it even updated "query_cache_type" to 1, which, according to the manuals mean ON.

Now, I was wondering if any of you have a hint on what might be wrong?

Also, as a little sidenote, I'm kinda wondering, what is a _decent_ size for the Cache buffer? is 64 Mb enough? I'm getting an upgraded server aswell, it
will be 800 Mhz and have 256 MB of ram, this box will be 100% MySQL and I'll leave the Webserver on the old 400 Mhz. Any other hints on general
optimizing is appreciated!
I only use 1MB, but I don't have a lot of repeated huge queries.


Sorry if this post got too long, this is my first time posting on this list. Take it easy on my poor english skills =)

---------------------------------------------------------------------
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to