Replication MySQL : erreur 1200

Fermé
czmaster - 24 août 2006 à 16:01
 Amine - 16 avril 2007 à 22:23
Bonjour,
J'éssaye de faire une réplication mysql.

Tout ce passe bien avec la commande :
LOAD DATA FROM MASTER;
Mais quand je tape:
START SLAVE;
Voilà ce que j'obtiens:
ERROR 1200: The server is not configured as slave, fix in config file or with CHANGE MASTER TO

Voici mes infos (qui s'affichent en tapant show slave status\G) :

Master_Host: xxx.ovh.net
Master_User: xxx
Master_Port: 3306
Connect_retry: 60
Master_Log_File:
Read_Master_Log_Pos: 4
Relay_Log_File: serveurlinux-relay-bin.001
Relay_Log_Pos: 4
Relay_Master_Log_File:
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_do_db:
Replicate_ignore_db:
Last_errno: 0
Last_error:
Skip_counter: 0
Exec_master_log_pos: 0
Relay_log_space: 8
Pourriez vous me dire ce que j'ai mal fait !!


Merci !!

1 réponse

Bonjour,

J'éssaye de faire une réplication mysql.

J’utilise la version mysql 5.0.22-debian_0ubuntu6.

Sur le maître j’ai fait

mysql> grant replication slave on *.* to 'replication'@XX.XX.XX.1 identified by 'password';

Une partie du fichier my.cnf du master :

[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
#
server-id = 1
log-bin = /var/log/mysql/mysql-bin.log
expire-logs-days = 20
max_binlog_size = 104857600
binlog-do-db = radius
#binlog-ignore-db = include_database_name
#

Voici les infos qui s'affichent en tapant show master status\G):

mysql> show master status\G;
*************************** 1. row ***************************
File: mysql-bin.000001
Position: 98
Binlog_Do_DB: radius,radius
Binlog_Ignore_DB:
1 row in set (0.21 sec)

ERROR:
No query specified

Sur l’esclave j’ai fait

mysql> change master to master_host = 'XX.XX.XX.2' , master_user = 'replication', master_password = 'password', master_log_file = 'mysql-bin.000001', master_log_pos = 98;

Une partie du fichier my.cnf de l’esclave:

[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
#
server-id = 2
log-bin = /var/log/mysql/mysql-bin.log
expire-logs-days = 20
max_binlog_size = 104857600
binlog-do-db = radius
#binlog-ignore-db = include_database_name


Voici les infos qui s'affichent en tapant show slave status\G :


mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Connecting to master
Master_Host: XX.XX.XX.2
Master_User: replication
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000001
Read_Master_Log_Pos: 98
Relay_Log_File: radius1-relay-bin.000004
Relay_Log_Pos: 98
Relay_Master_Log_File: mysql-bin.000001
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
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: 484
Relay_Log_Space: 98
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)

ERROR:
No query specified

###############

Je trouve

Slave_IO_Running: No

j’ai fait stp slave et start slave mais rien ne change

Slave_IO_Running: No

J’ai redémarrer mysql mais rien ne change

Slave_IO_Running: No


Mais pourquoi ???????????

Si quelqu’un à une idée

Aidez moi svp

Merci

Amine
0