MySQL replication problem: ‘show master status’ shows ‘Empty set (0.00 sec)’

mysql logo
Once you have set up MySQL replication master, but unfortunately the “show master status” command shows the following, rather than any useful output:

mysql > show master status;

Empty set (0.00 sec)

While the error log at /var/log/mysql.err is an empty file.

Solution for fix ‘show master status’ shows ‘Empty set (0.00 sec)’:

I’ve had this problem, I’ve been running the MySQL server with binary log not enabled. So, I have the “empty set” error message when I run a “show master status” command, and I run “show binary logs” command to show the binary log information, it shows “”ERROR 1381 (HY000): You are not using binary logging” message instead.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 117905
Server version: 5.5.14-log MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show master status;
Empty set (0.00 sec)

mysql> show binary logs;
ERROR 1381 (HY000): You are not using binary logging

As shown, since MySQL shows “Empty Set” for SHOW MASTER STATUS; because binary logging was not enabled. So, the first thing you should do is make sure your have a log-bin option in MySQL configuration file (my.cnf):

log-bin = /var/lib/mysql/log-bin

And then you should check owner and group permission of the log-bin directory that they must owned by mysql user and group. So, if the directory is not owned by mysql user and group you can run the following commands to fix it:

[root@ezylinux ~]# service mysql stop
[root@ezylinux ~]# chown -R mysql:mysql /path/of/bin-log
[root@ezylinux ~]# service mysql start
You can leave a response, or trackback from your own site.

Leave a Reply

*