Chinaunix首页 | 论坛 | 博客
  • 博客访问: 388859
  • 博文数量: 166
  • 博客积分: 1972
  • 博客等级: 上尉
  • 技术积分: 1845
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-19 21:16
文章分类

全部博文(166)

文章存档

2013年(7)

2010年(159)

分类: Mysql/postgreSQL

2010-10-12 16:14:02

  • [root@ytest root_bak_09292010]# df -h
  • Filesystem Size Used Avail Use% Mounted on
  • /dev/sda5 219G 208G 0 100% /
  • 1 只是用了208G 但是mysql 报错
  • 首先报最大连接错误
  • 客户端连接的报错如下
  • [root@ytest db]# mysql -uroot -p
  • Enter password:
  • ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
  • 看日志
  • /usr/local/mysql/libexec/mysqld: Disk is full writing './mysql-bin.000045' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)
  • /usr/local/mysql/libexec/mysqld: Retry in 60 secs. Message reprinted in 600 secs
  • mv /root/bak/db/member.2010-04* /data/root_bak_09292010
  • mv /root/bak/db/member.2010-05* /data/root_bak_09292010
  • mv /root/bak/db/yoohouse_alpha.2010-04* /data/root_bak_09292010
  • mv /root/bak/db/yoohouse_estate.2010-04* /data/root_bak_09292010
  • mv /root/bak/db/yoohouse_estate.2010-05* /data/root_bak_09292010
  • mv /root/bak/db/yoohouse_alpha.2010-05* /data/root_bak_09292010
  • mv /root/bak/db/yoohouse_alpha.2010-06* /data/root_bak_09292010
  • mv /root/bak/db/yoohouse_estate.2010-06* /data/root_bak_09292010
  • mv /root/bak/db/member.2010-06* /data/root_bak_09292010
  •  
  • 2 解决
  • [root@ytest db]# df -h
  • Filesystem Size Used Avail Use% Mounted on
  • /dev/sda5 219G 207G 944M 100% /
  • 100929 10:01:16 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
  • 100929 10:01:16 [Warning] The syntax 'for replication startup options' is deprecated and will be removed in MySQL 6.0. Please use 'CHANGE MASTER' instead.
  • 100929 10:01:17 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=ytest-relay-bin' to avoid this problem.
  • 100929 10:01:17 [Note] Event Scheduler: Loaded 0 events
  • 100929 10:01:17 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
  • Version: '5.1.40-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
  • [root@ytest bin]# ./mysqld_safe &
  • [1] 15845
  • [root@ytest bin]# 100929 10:01:16 mysqld_safe Logging to '/usr/local/mysql/var/ytest.err'.
  • 100929 10:01:16 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
  •  
  • 3 报错
  • 重启
  • [root@ytest bin]# ./httpd &
  • [1] 16020
  • 5分钟后 恢复完成
  •  
  • 4 mysql ab 同步的 恢复
  • show slave status\G;
  • Exec_Master_Log_Pos: 330788478
  • Relay_Log_Space: 330789168
  • 一直不增加
  • mysql> slave start;
  • Query OK, 0 rows affected (0.00 sec)
  •  
  • 但报错
  • mysql> show slave status\G;
  • *************************** 1. row ***************************
  • Slave_IO_State: Waiting for master to send event
  • Master_Host: 10.2.2.100
  • Master_User: office_slave
  • Master_Port: 3306
  • Connect_Retry: 60
  • Master_Log_File: mysql-bin.000044
  • Read_Master_Log_Pos: 352836403
  • Relay_Log_File: ytest-relay-bin.000078
  • Relay_Log_Pos: 330788623
  • Relay_Master_Log_File: mysql-bin.000044
  • Slave_IO_Running: Yes
  • Slave_SQL_Running: No
  • Replicate_Do_DB: member,yoohouse_alpha,yoohouse_estate,dw,dw_access
  • Replicate_Ignore_DB: mysql
  • Replicate_Do_Table:
  • Replicate_Ignore_Table:
  • Replicate_Wild_Do_Table:
  • Replicate_Wild_Ignore_Table:
  • Last_Errno: 1594
  • Last_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
  • Skip_Counter: 0
  • Exec_Master_Log_Pos: 330788478
  • Relay_Log_Space: 352837693
  • Until_Condition: None
  • Until_Log_File:
  • Until_Log_Pos: 0
  • Master_SSL_Allowed: No
  • Master_SSL_CA_File:
  • Master_SSL_CA_Path:
  • Master_SSL_Cert:
  • Master_SSL_Cipher:
  • Master_SSL_Key:
  • Seconds_Behind_Master: NULL
  • Master_SSL_Verify_Server_Cert: No
  • Last_IO_Errno: 0
  • Last_IO_Error:
  • Last_SQL_Errno: 1594
  • Last_SQL_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
  • 1 row in set (0.00 sec)
  •  
  • ERROR:
  • No query specified
  •  
  • 查看 本机 binlog 今天同步失败了
  • -rw-rw---- 1 mysql mysql 475141220 Jul 26 02:29 mysql-bin.000036
  • -rw-rw---- 1 mysql mysql 769563 Jul 28 10:22 mysql-bin.000037
  • -rw-rw---- 1 mysql mysql 20542 Jul 28 10:54 mysql-bin.000038
  • -rw-rw---- 1 mysql mysql 20533248 Sep 29 09:31 mysql-bin.000039
  • -rw-rw---- 1 mysql mysql 0 Sep 29 09:33 mysql-bin.000040
  • -rw-rw---- 1 mysql mysql 0 Sep 29 09:34 mysql-bin.000041
  • -rw-rw---- 1 mysql mysql 0 Sep 29 09:36 mysql-bin.000042
  • -rw-rw---- 1 mysql mysql 0 Sep 29 09:53 mysql-bin.000043
  • -rw-rw---- 1 mysql mysql 0 Sep 29 09:53 mysql-bin.000044
  • -rw-rw---- 1 mysql mysql 0 Sep 29 09:55 mysql-bin.000045
  • -rw-rw---- 1 mysql mysql 5217 Sep 29 10:17 mysql-bin.000046
  • mysql> slave stop;
  • Query OK, 0 rows affected (0.00 sec)
  •  
  • mysql> CHANGE MASTER TO MASTER_HOST='10.2.2.100',MASTER_USER='office_slave',MASTER_PASSWORD='yoo123',MASTER_LOG_FILE='mysql-bin.000039',MASTER_LOG_POS=1024;
  • Query OK, 0 rows affected (0.32 sec)
  •  
  • mysql> slave start;
  • Query OK, 0 rows affected (0.00 sec)
  • mysql> show slave status\G;
  • *************************** 1. row ***************************
  • Slave_IO_State:
  • Master_Host: 10.2.2.100
  • Master_User: office_slave
  • Master_Port: 3306
  • Connect_Retry: 60
  • Master_Log_File: mysql-bin.000039
  • Read_Master_Log_Pos: 1024
  • Relay_Log_File: ytest-relay-bin.000002
  • Relay_Log_Pos: 251
  • Relay_Master_Log_File: mysql-bin.000039
  • Slave_IO_Running: No
  • Slave_SQL_Running: Yes
  • Replicate_Do_DB: member,yoohouse_alpha,yoohouse_estate,dw,dw_access
  • Replicate_Ignore_DB: mysql
  • Replicate_Do_Table:
  • Replicate_Ignore_Table:
  • Replicate_Wild_Do_Table:
  • Replicate_Wild_Ignore_Table:
  • Last_Errno: 0
  • Last_Error:
  • Skip_Counter: 0
  • Exec_Master_Log_Pos: 1024
  • Relay_Log_Space: 406
  • Until_Condition: None
  • Until_Log_File:
  • Until_Log_Pos: 0
  • Master_SSL_Allowed: No
  • Master_SSL_CA_File:
  • Master_SSL_CA_Path:
  • Master_SSL_Cert:
  • Master_SSL_Cipher:
  • Master_SSL_Key:
  • Seconds_Behind_Master: NULL
  • Master_SSL_Verify_Server_Cert: No
  • Last_IO_Errno: 1236
  • Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'
  • Last_SQL_Errno: 0
  • Last_SQL_Error:
  • 1 row in set (0.00 sec)
  •  
  • ERROR:
  • No query specified
  •  
  • 阅读(2120) | 评论(0) | 转发(0) |
    给主人留下些什么吧!~~