show master status 时没有数据显示

环境:
             系统:centos 4.8 (64位)
             yum安装的mysql数据库。
                   今天做mysql主从时,查看master日志时没有数据显示,
                   mysql> show master status;
                   Empty set (0.00 sec)
                   mysql>
从网上搜了一下说是master数据库没有启动 show <wbr>master <wbr>status <wbr> <wbr> <wbr>时没有数据显示          最后终于弄出来了,
用yum安装的mysql数据库/etc/my.cnf文件只是满足基本要求,
如:           [mysqld]
                   datadir=/var/lib/mysql
                   socket=/var/lib/mysql/mysql.sock
                   user=mysql
                   # Default to using old password format for compatibility with mysql 3.x
                   # clients (those using the mysqlclient10 compatibility package).
                   old_passwords=1

                   # Disabling symbolic-links is recommended to prevent assorted security risks;
                   # to do so, uncomment this line:
                   # symbolic-links=0
                   server-id = 130
                   [mysqld_safe]
                   err-log=/var/log/mysqld.log
                   pid-file=/var/run/mysqld/mysqld.pid
在/etc/my.cnf文件中添加一行
                 log-bin=mysql-bin
然后重启mysql数据库即可;
mysql> show master status;
+------------------+----------+--------------+------------------+
| File                         | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 |             79 |                           |                                   |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)

mysql>

转载于:https://my.oschina.net/neo600/blog/136994

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值