perfectacle
perfectacle

Reputation: 59

how to enable mysql bin log

OS: Mac OS X Hi Sierra(10.13.1)
MySQL: 5.7.20 (install by homebrew)

I want to enable bin log, so I should edit my.cnf file,
I typed below command to find my.cnf file
mysql --verbose --help | grep my.cnf

and result /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
/etc/my.cnf, /etc/mysql/my.cnf isn't exist in my mac.

So, I edit /usr/local/etc/my.cnf file.
[mysqld] bind-address = 127.0.0.1 log-bin = ~/log

and I start mysql but it can't start.
mysql.server start Starting MySQL ... ERROR! The server quit without updating PID file (/usr/local/var/mysql/*.pid).

When I remove bin-log in my.cnf, it can start!
How can I enable bin log??

Upvotes: 2

Views: 3236

Answers (1)

perfectacle
perfectacle

Reputation: 59

Standby counsel

I missed server-id property in my.cnf...

Upvotes: 2

Related Questions