Archive for the 'MySQL' Category

Tuesday, October 28th, 2008

A query is considered as slow if it takes more than “long_query_time” seconds to execute. By default, the value of this variable is set to “1″.
1). Identifying MySQL slow queries
************************************
First let’s check on the mysql server if we have slow query logging enabled:
mysqladmin var |grep log_slow_queries | log_slow_queries | OFF
2) . Activate the logging of […]

Wednesday, August 27th, 2008

MySQL server and client uses a file called my.cnf. You need to open /etc/my.cnf (Global mysqld configuration file) to specify new port.
Open /etc/my.cnf file:
# vi /etc/my.cnf
Set new port 5123:
port=5123
Here is is my sample /etc/my.cnf file:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
port=5123
old_passwords=1
bind = 10.10.29.66
key_buffer = 500M
table_cache = 4000
sort_buffer_size = 3M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
max_connections = 400
query_cache_type = 1
query_cache_limit = 1M
query_cache_size […]