Database ServerMySQL
MySQL replication problem: ‘show master status’ shows ‘Empty set (0.00 sec)’
In MySQL replication, you setup master and slave MySQL server. On master server, while checking the master status, you might end up with following error message:
mysql> SHOW MASTER STATUS;
Empty set (0.00 sec)
mysql> show binary logs;
ERROR 1381 (HY000): You are not using binary logging
The MySQL error log will not provide any help as it will not record any error log.
Solution:
In my case, the problem was due to the binary logs of MySQL. The binary logs either were not enabled or the permission of the binary log file were not correct.
1) Check the log-bin path in my.cnf file:
vi /etc/my.cnf log-bin=/var/lib/mysql/log-bin.log
and stop MySQL service.
2) Change the ownership and group of "/var/lib/mysql/log-bin.log" to mysql
chown mysql:mysql /var/lib/mysql/log-bin.log
and start MySQL service.
3) Login in MySQL prompt and check
mysql> SHOW MASTER STATUS;
+----------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+----------------+----------+--------------+------------------+
| log-bin.000001 | 106 | exampledb | |
+----------------+----------+--------------+------------------+
1 row in set (0.00 sec)
Hope this helps!
I try this solution too, but still get "you are not using binary logging"...
I'm depressing.
The my.cnf file is ok.
The permission is ok.