加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

show master status   时没有数据显示

(2011-09-30 20:48:50)
标签:

杂谈

分类: MYSQL
环境:
       系统:centos 4.8 (64位)
       yum安装的mysql数据库。
          今天做mysql主从时,查看master日志时没有数据显示,
          mysql> show master status;
          Empty set (0.00 sec)
          mysql>
从网上搜了一下说是master数据库没有启动http://www/uc/myshow/blog/misc/gif/E___6687EN00SIGG.gifmaster status   时没有数据显示" TITLE="show master status   时没有数据显示" />     最后终于弄出来了,
用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>


0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有