0

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.

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109
Alaa Alomari
  • 638
  • 6
  • 19
  • 37

2 Answers2

0

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

HTTP500
  • 4,833
  • 4
  • 23
  • 31
0

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
Alaa Alomari
  • 638
  • 6
  • 19
  • 37