- From: Mike <
>
- To:
- Subject: [chef] Re: Enabling bin-logging with mysql recipe
- Date: Thu, 13 Dec 2012 13:31:30 -0500
A quick question I'd have is:
Has mysqld been restarted post-config file change?
-M
On Thu, Dec 13, 2012 at 11:31 AM, Mathieu Martin
<
>
wrote:
>
Hey everyone,
>
>
>
I've been banging my head against the wall all morning with this one :-) I'm
>
trying to enable bin-logging in mysql, to eventually set up replication.
>
>
I'm using the most recent version of the mysql cookbook (I just git pulled
>
the repo), on CentOS 6.3.
>
>
I'm setting server-id to 1 and log_bin to "vagrant-bin", as you can see in
>
the following node.json:
>
>
{ "mysql": {
>
"server_root_password": "",
>
"server_repl_password": "",
>
"server_debian_password": "",
>
"tunable": {
>
"innodb_buffer_pool_size": "256M",
>
"log_queries_not_using_index": true,
>
"max_allowed_packet": "16M",
>
"max_heap_table_size": "32M",
>
"query_cache_size": 0,
>
"max_connections": 500,
>
"thread_cache_size": 50,
>
"innodb_flush_method": "O_DIRECT",
>
"innodb_log_file_size": "64M",
>
"log_error": "/var/log/mysql-error.log",
>
"log_queries_not_using_index": true,
>
"log_slow_queries": "/var/log/mysql-slow.log",
>
"old_passwords": 0,
>
"log_bin": "vagrant-bin",
>
"server_id": "1"
>
}
>
},
>
"run_list":[ "mysql::server" ]
>
}
>
>
As you can guess, I'm just kicking the tires in Vagrant first :-)
>
>
After running chef-solo, my /etc/my.cnf seems ok, here's the relevant part,
>
from the [mysqld] section:
>
...
>
server-id = 1
>
binlog_format = statement
>
log_bin = vagrant-bin
>
...
>
>
However, after the chef run (or even after a manual service mysqld restart),
>
bin logging and the server id don't get picked up at all. From the mysql
>
console:
>
SHOW VARIABLES LIKE 'log_bin' \G SHOW VARIABLES LIKE 'server_id' \G
>
*************************** 1. row ***************************
>
Variable_name: log_bin
>
Value: OFF
>
1 row in set (0.01 sec)
>
>
*************************** 1. row ***************************
>
Variable_name: server_id
>
Value: 0
>
1 row in set (0.00 sec)
>
>
>
So my questions are: has anybody successfully enabled bin-logging with the
>
mysql cookbook? If so, which version of the cookbook? Any gotchas I should
>
be aware of? Any related config I should be considering?
>
>
Note: upon further inspection, none of the configs I'm setting seems to get
>
picked up at all. They all appear correctly in /etc/my.cnf, but mysqld
>
doesn't seem to take them into account...
>
>
>
Any help is greatly appreciated!
>
>
Mathieu
>
Archive powered by MHonArc 2.6.16.