Submitted by Mathew Branwell on Fri, 08/02/2013 - 14:25
[mysqld]
skip-networking
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
log-slow-queries = /var/log/mysql_slow.log
open_files_limit =24000
symbolic-links=0
thread_concurrency = 8
query_cache_size = 32M
thread_cache_size = 8
myisam_sort_buffer_size = 64M
read_rnd_buffer_size = 8M
read_buffer_size = 2M
sort_buffer_size = 2M
table_cache = 512
max_allowed_packet = 32M
key_buffer = 384M
max_heap_table_size = 64M
query_cache_limit = 2M
innodb_file_per_table = 1
innodb_additional_mem_pool_size = 16M
innodb_flush_log_at_trx_commit = 0
Submitted by Mathew Branwell on Fri, 08/02/2013 - 14:21
InnoDB is insanely picky about it's config; if something's not right, it'll just give up and go home. To make a change to the log file size without data loss:
- Revert any config changes you've made to the log file size and start MySQL again.
- In your running MySQL: SET GLOBAL innodb_fast_shutdown=0;
- Stop MySQL
- Make the configuration change to the log file size.
- Delete both log files.
- Start MySQL. It will complain about the lack of log files, but it'll create them and all will be well.
Submitted by Mathew Branwell on Thu, 02/14/2013 - 19:35
To close port #3306 from outside networks add this to /etc/my.cnf' under the [mysqld] section:
skip-networking
then run 'service mysqld restart' and then 'netstat -tln' to see if the port comes up in the list of open ports:
root@my:/var/named#
netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN
Submitted by Mathew Branwell on Thu, 04/05/2012 - 02:29
MySQL provides many different log files to capture various information that you can use for performance tuning or during problem determination.
To enable the log files, do the following:
Create the /etc/my.cnf options file with the following definitions that enable the log files automatically:
[mysqld]
log-bin
log
log-error
log-slow-queries
By default, the logs are placed in the data directory /pathname/mysql/data. The log names default to the name of the host system followed by a log identifier such as -bin.
Recent comments