In response to Gleb Paharenko and Bruce Dembecki:

Gleb Paharenko wrote:

>Please send us an output of SHOW MASTER STATUS ans SHOW SLAVE STATUS.
>Can you reproduce the problem using official binaries?

I have included the output of those two commands below.  I will try to
reproduce the problem using non-debian-specific binaries.

(As a side note, I originally attempted to set these servers up with
version 4.0.23-4 (debian package) before reinstalling with version
4.1.9-2 (debian package), and I appeared to have the same problem in
both cases.)


Bruce Dembecki wrote:

>Looking at your my.cnf files I don't see where you've told the slave what
>server to connect to. The slave needs to know what server is the master.
>This is usually accomplished by including a couple of lines in my.cnf.
>
> [...]
>
>If the master.info file exists and
>is blank or doesn't include enough information, delete it. If it's there and
>looks right, include it's contents in your next mail here (you can blank out
>the username/password info).

I used the CHANGE MASTER TO command interactively, rather than setting
the master in the config file.  I assumed that this would be
sufficient, and from the log on the master (see my original email) it
does appear that the slave is logging in, at least very briefly.

I've included the contents of my master.info file below.  It seems
appropriate to me, but I've never seen one before.  :)

Thanks,

Tierney

------------------------------------
mysql> SHOW MASTER STATUS\G
*************************** 1. row ***************************
            File: mysql-bin.000001
        Position: 79
    Binlog_Do_DB: replicated
Binlog_Ignore_DB: mysql,test
1 row in set (0.00 sec)

------------------------------------
mysql> SHOW SLAVE STATUS\G
*************************** 1. row ***************************
             Slave_IO_State:
                Master_Host: 192.168.0.19
                Master_User: slave
                Master_Port: 3306
              Connect_Retry: 60
            Master_Log_File: mysql-bin.000001
        Read_Master_Log_Pos: 79
             Relay_Log_File: training1-relay-bin.000007
              Relay_Log_Pos: 4
      Relay_Master_Log_File: mysql-bin.000001
           Slave_IO_Running: No
          Slave_SQL_Running: Yes
            Replicate_Do_DB: replicated
        Replicate_Ignore_DB: mysql,test
         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: 79
            Relay_Log_Space: 4
            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
1 row in set (0.00 sec)
------------------------------------

# cat master.info
14
mysql-bin.000001
79
192.168.0.19
<username>
<password>
3306
60
0


>Tierney Thurban <[EMAIL PROTECTED]> wrote:
>
>>Hi all.  Sorry if you get this twice -- it was posted to
>>mysql-replication earlier, but it doesn't look like that list is
>>really used.
>>
>>I'm having a problem with my replication setup.  This is my first time
>>setting up replication, so this may be a simple problem.  I'm using
>>one master and one slave, both running debian-testing, and they both
>>have brand new 4.1.9 mysql installs (via apt-get).
>>
>>The problem is that each time I do a START SLAVE, the I/O thread dies
>>almost immediately.  I can see it running only if I do START SLAVE;
>>SHOW SLAVE STATUS\G on a single line.
>>
>>The master's log shows the following each time I START SLAVE or START
>>SLAVE IO_THREAD:
>>
>>6 Connect     slave@<IP> on
>>6 Query       SELECT UNIX_TIMESTAMP()
>>6 Query       SHOW VARIABLES LIKE 'SERVER_ID'
>>6 Query       SELECT @@GLOBAL.COLLATION_SERVER
>>6 Query       SELECT @@GLOBAL.TIME_ZONE
>>6 Query       SHOW SLAVE HOSTS
>>6 Quit
>>
>>There are no error messages in the .err file on either server, even
>>with --log-warnings on both.  I've added everything appropriate that
>>I've been able to find to my.cnf on each server (see below).
>>
>>If anyone has any suggestions, please let me know -- I've been looking
>>through docs and mailing lists for quite some time now, with no luck.
>>
>>Thanks,
>>
>>Tierney
>>
>>Here's what I did to set up replication:
>>
>>I added / changed a number of fields in my.cnf on both machines (see below).
>>
>>Master:
>>Started mysqld.
>>Created a new database, a new table, and put a single row in it.
>>Created a slave account:
>>  GRANT REPLICATION SLAVE ON *.* TO 'slave'@'%' IDENTIFIED BY 'xxxxx'
>>Locked the database:
>>  FLUSH TABLES WITH READ LOCK
>>Tar'd the <data_dir>/replicated directory and transferred it to the slave.
>>Checked the binlog file and position and unlocked the database:
>>  SHOW MASTER STATUS
>>  UNLOCK TABLES
>>
>>Slave:
>>Started mysqld.
>>Set the master:
>>  CHANGE MASTER TO
>>    MASTER_HOST='<IP>',
>>    MASTER_USER='slave',
>>    MASTER_PASSWORD='xxxxx',
>>    MASTER_LOG_FILE='<recorded value>',
>>    MASTER_LOG_POS=<recorded value>;
>>Began replication:
>>  START SLAVE;
>>
>>Master's my.cnf (comment lines removed):
>>
>>[client]
>>port            = 3306
>>socket          = /var/run/mysqld/mysqld.sock
>>
>>[mysqld_safe]
>>socket          = /var/run/mysqld/mysqld.sock
>>nice            = 0
>>
>>[mysqld]
>>user            = mysql
>>pid-file        = /var/run/mysqld/mysqld.pid
>>socket          = /var/run/mysqld/mysqld.sock
>>port            = 3306
>>log             = /var/log/mysql/mysql.log
>>basedir         = /usr
>>datadir         = /var/lib/mysql
>>tmpdir          = /tmp
>>language        = /usr/share/mysql/english
>>skip-external-locking
>>
>>old-passwords   = 1
>>
>>key_buffer              = 16M
>>max_allowed_packet      = 16M
>>thread_stack            = 128K
>>
>>query_cache_limit       = 1048576
>>query_cache_size        = 26214400
>>query_cache_type        = 1
>>
>>server-id               = 1
>>log-bin                 = /var/log/mysql/mysql-bin.log
>>binlog-do-db            = replicated
>>log-warnings
>>binlog-ignore-db        = mysql
>>binlog-ignore-db        = test
>>
>>[mysqldump]
>>quick
>>quote-names
>>max_allowed_packet      = 16M
>>
>>[mysql]
>>
>>[isamchk]
>>key_buffer              = 16M
>>
>>Slave's my.cnf (comment lines removed)
>>
>>[client]
>>port            = 3306
>>socket          = /var/run/mysqld/mysqld.sock
>>
>>[mysqld_safe]
>>socket          = /var/run/mysqld/mysqld.sock
>>nice            = 0
>>
>>[mysqld]
>>user            = mysql
>>pid-file        = /var/run/mysqld/mysqld.pid
>>socket          = /var/run/mysqld/mysqld.sock
>>port            = 3306
>>log             = /var/log/mysql/mysql.log
>>basedir         = /usr
>>datadir         = /var/lib/mysql
>>tmpdir          = /tmp
>>language        = /usr/share/mysql/english
>>skip-external-locking
>>
>>old-passwords   = 1
>>
>>key_buffer              = 16M
>>max_allowed_packet      = 16M
>>thread_stack            = 128K
>>
>>query_cache_limit       = 1048576
>>query_cache_size        = 26214400
>>query_cache_type        = 1
>>
>>server-id               = 2
>>replicate-do-db         = replicated
>>replicate-ignore-db     = mysql
>>replicate-ignore-db     = test
>>log-warnings
>>log-bin                 = /var/log/mysql/mysql-bin.log
>>
>>[mysqldump]
>>quick
>>quote-names
>>max_allowed_packet      = 16M
>>
>>[mysql]
>>
>>[isamchk]
>>key_buffer              = 16M
>>
>
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to