First off, this is the first time I have done replication in MySQL so the
problem very well may be my fault. I run a simple master / slave setup that
Replicates one database. Replication works for a day or two then for
reasons unknown to me I see this on show slave status, "Last_error: error
'Server shutdown in progress'...� but Uptime on the Master and Slave both
show dates that are older than when the error occurred.
This problem has been occurring for ~ 2 weeks. 3 days ago I moved the
Slave into the same rack as the master so they would be on the same
subnet/switch, but the problem still exists.
I could implement a perl script to just check the replication status, and
take necessary action to restart the slave if the SQL thread is down, but I
was wondering if a more elegant solution existed.
Thanks
James
([EMAIL PROTECTED]) [(none)]> show slave status\G
*************************** 1. row ***************************
Master_Host: Replaced
Master_User: Replaced
Master_Port: Replaced
Connect_retry: 60
Master_Log_File: MASTER-bin.010
Read_Master_Log_Pos: 131845183
Relay_Log_File: SLAVE001-relay-bin.004
Relay_Log_Pos: 257067861
Relay_Master_Log_File: MASTER-bin.010
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_do_db: MASTER
Replicate_ignore_db:
Last_errno: 1053
Last_error: error 'Server shutdown in progress' on query 'UPDATE
LOW_PRIORITY thread SET views=views+1 WHERE threadid='154039''
Skip_counter: 0
Exec_master_log_pos: 108378574
Relay_log_space: 280534474
1 row in set (0.00 sec)
([EMAIL PROTECTED]) [(none)]> select now();
+---------------------+
| now() |
+---------------------+
| 2003-07-18 10:11:27 |
+---------------------+
1 row in set (0.02 sec)
([EMAIL PROTECTED]) [(none)]> start slave;
Query OK, 0 rows affected (36.25 sec)
([EMAIL PROTECTED]) [(none)]> status;
--------------
mysql Ver 12.18 Distrib 4.0.12, for unknown-freebsd4.8 (i386)
Connection id: 5239
Current database:
Current user: [EMAIL PROTECTED]
SSL: Not in use
Current pager: /usr/bin/less
Using outfile: ''
Server version: 4.0.13
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket: /tmp/replication.sock
Uptime: 3 days 15 hours 26 min 43 sec
Then on my master.
([EMAIL PROTECTED]) [(none)]> status;
--------------
mysql Ver 12.20 Distrib 4.0.13, for unknown-freebsd4.8 (i386)
Connection id: 71764
Current database:
Current user: [EMAIL PROTECTED]
SSL: Not in use
Current pager: more
Using outfile: ''
Server version: 4.0.13-log
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket: /tmp/mysql.sock
Uptime: 16 days 19 hours 7 min 47 sec
Threads: 92 Questions: 53552863 Slow queries: 698 Opens: 83017 Flush
tables: 1 Open tables: 64 Queries per second avg: 36.901
--------------
([EMAIL PROTECTED]) [(none)]> select now();
+---------------------+
| now() |
+---------------------+
| 2003-07-18 10:16:26 |
+---------------------+
1 row in set (0.00 sec)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]