MySQL Tips & Tricks
SHOW VARIABLES LIKE 'query_cache_size';
SET GLOBAL query_cache_size = 16777216;
So the moral of the story is this: If you have a busy server that's getting a lot of quick connections, set your thread cache high enough that the Threads_created value in SHOW STATUS stops increasing. Your CPU will thank you.
SELECT @@global.thread_cache_size;
SET GLOBAL thread_cache_size=40;
table_cache = 1000
query_cache_limit = 1M
query_cache_size = 64M
[mysqld]
innodb_data_home_dir = /ibdata
innodb_data_file_path=ibdata1:50M;ibdata2:50M:autoextend
Note
InnoDB does not create directories, so make sure that the /ibdata directory exists before you start the server. This is also true of any log file directories that you configure. Use the Unix or DOS mkdir command to create any necessary directories.
Make sure that the MySQL server has the proper access rights to create files in the data directory. More generally, the server must have access rights in any directory where it needs to create data files or log files.
No comments:
Post a Comment