The binary log has not been output yet.
[vagrant@localhost ~]$ ls /var/lib/mysql/
addb count equity ibdata1 mysql.sock zeus
auto.cnf demo ib_logfile0 laravel57 performance_schema
click dev ib_logfile1 mysql test
Add log-bin and configure to output binary log.
log-binを足します。
[vagrant@localhost ~]$ sudo vi /etc/my.cnf
[vagrant@localhost ~]$ cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
character_set_server=utf8
default-storage-engine=InnoDB
innodb_file_per_table
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used (fedora >= 15).
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
user=mysql
# Semisynchronous Replication
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html
# uncomment next line on MASTER
;plugin-load=rpl_semi_sync_master=semisync_master.so
# uncomment next line on SLAVE
;plugin-load=rpl_semi_sync_slave=semisync_slave.so
# Others options for Semisynchronous Replication
;rpl_semi_sync_master_enabled=1
;rpl_semi_sync_master_timeout=10
;rpl_semi_sync_slave_enabled=1
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html
;performance_schema
[mysql]
default-character-set=utf8
[mysqldump]
default-character-set=utf8
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
log-bin
[vagrant@localhost ~]$ sudo service mysqld restart
mysqld を停止中: [ OK ]
mysqld を起動中: [ OK ]
[vagrant@localhost ~]$ ls /var/lib/mysql/
addb count equity ibdata1 mysql.sock zeus
auto.cnf demo ib_logfile0 laravel57 performance_schema
click dev ib_logfile1 mysql test
あれ、、、、、、、、、、、、 bin-log出てないやんけ。おかしいな。。
mysql> create database sample;
Query OK, 1 row affected (0.02 sec)
mysql> quit
Bye
[vagrant@localhost ~]$ ls /var/lib/mysql/
log-binの追加する位置が悪いか。。