Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replication problem

Status
Not open for further replies.

Saeed42

ISP
Jul 4, 2001
147
I'm trying to setup two mysql servers so that one is a slave and always in sync with the master.


I read the Mysql manual and did everything or at least I think I did but I still have a problem where the slave crashes out after full reboot and gives the following error message

040120 11:06:14 Slave thread killed while connecting to master
040120 11:06:14 Slave thread exiting, replication stopped in log 'FIRST' at position 4
040120 11:06:14 /usr/libexec/mysqld: Shutdown Complete


If I restart I get a different error message which is


tail -f /var/log/mysqld.log
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
/usr/libexec/mysqld: ready for connections
040120 11:23:07 Slave thread: error connecting to master: Access denied for user: 'root@192.168.253.157' (Using password: YES) (0), retry in 60 sec

More Info

OS = Red hat 9
Mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)

SLAVE MY.CNF FILE

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
server-id=2
master-host=192.168.253.78
master-user=replicate
master-password=password
replicate-ignore-db=mysql

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


MASTER MY.CNF FILE

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
server-id=1
log-bin

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


mysql> show master status;
+-----------------+----------+--------------+------------------+
| File | Position | Binlog_do_db | Binlog_ignore_db |
+-----------------+----------+--------------+------------------+
| spritII-bin.003 | 879 | | |
+-----------------+----------+--------------+------------------+
1 row in set (0.00 sec)


mysql> show slave status;
+----------------+-------------+-------------+---------------+----------+-----+---------------+-----------------+---------------------+------------+------------+--------------+
| Master_Host | Master_User | Master_Port | Connect_retry | Log_File | Pos | Slave_Running | Replicate_do_db | Replicate_ignore_db | Last_errno | Last_error
| Skip_counter |
+----------------+-------------+-------------+---------------+----------+-----+---------------+-----------------+---------------------+------------+------------+--------------+
| 192.168.253.78 | root | 3306 | 60 | | 4 | Yes | | mysql | 0 |
| 0 |
+----------------+-------------+-------------+---------------+----------+-----+---------------+-----------------+---------------------+------------+------------+--------------+
1 row in set (0.00 sec)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Don't be content with being average. Average is as close to the bottom as it is to the top
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Don't pay attention to the bit about rebooting the system that was lack of sleep, the log only shows when the system is shutting down and stopping all the services.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Don't be content with being average. Average is as close to the bottom as it is to the top
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top