I am trying to enable binary log in order to create master slave for my DB.
MySQL version is 5.1.41-3ubuntu12.10-log
I have added this to my.cnf

log_bin            = /var/log/mysql/mysql-bin.log
expire_logs_days  = 1
max_binlog_size   = 100M

and

$ ls -l /var/log/mysql/mysql-bin.log
-rw-r--r-- 1 mysql root 0 2011-07-06 17:17 /var/log/mysql/mysql-bin.log

Now when I try to stop/start MySQL the starting process goes forever and I was forced to comment those entries in my.cnf to start MySQL again.

Anybody faced such problem? Any idea is highly appreciated.

link|improve this question

77% accept rate
1  
Do you see anything of use in the server log mysqld.log? – Michael Jul 6 '11 at 17:47
2  
If you can, > 'strace -Ff -v /etc/init.d/mysql > start' and post output please. – Khushil Jul 6 '11 at 19:45
feedback

2 Answers

Do you have a host_name-bin.index file created? If not, specify log-bin-index as well.

link|improve this answer
feedback
up vote 0 down vote accepted

Thanks guys for your help
it was permission of the log directory itself. i have changed it to be

drwx------ 7 mysql mysql  4096 2011-07-06 20:06 mysql

it was

drwx------ 7 root root  4096 2011-07-06 20:06 mysql
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.