I have two servers, server5.mydomain.com and server8.mydomain.com. I want to
replicate one database on server5 to server 8.
I did the whole proceedure as recommended in
http://dev.mysql.com/doc/mysql/en/replication-howto.html - 6.4. How to Set
Up Replication
I setup the GRANT statement on server5 for the slave.
mysql> SHOW GRANTS FOR [EMAIL PROTECTED];
+---------------------------------------------------------------------------
-------------------------------------------+
| Grants for [EMAIL PROTECTED]
|
+---------------------------------------------------------------------------
-------------------------------------------+
| GRANT RELOAD, SUPER, REPLICATION SLAVE ON *.* TO 'server8'@'MyServer8IP'
IDENTIFIED BY PASSWORD 'xxxxxxx' |
+---------------------------------------------------------------------------
-------------------------------------------+
1 row in set (0.00 sec)
But when I stop and start the slave, I get:
050316 8:56:42 [Note] Slave SQL thread initialized, starting replication in
log 'mysql-bin.000004' at position 79, relay log
'./server8-relay-bin.000001' position: 4
050316 8:56:42 [ERROR] Slave I/O thread: error connecting to master
'[EMAIL PROTECTED]:3306': Error: 'Unknown MySQL server host
'server5.picado.com' (1)' errno: 2005 retry-time: 60 retries: 86400
When I try from the command line, I get it to work without problem:
[EMAIL PROTECTED] mysql]# mysql -h server5.domain.com -u server8 -pxxxxxxxx
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 30 to server version: 4.1.10-standard-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
Both /etc/my.cnf files are listed below
[EMAIL PROTECTED] mysql]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
old_passwords
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size= 16M
skip-networking
sort_buffer=2M
log-bin
server-id=2
log-slave-updates
log-warnings
replicate-ignore-db=mysql
replicate-do-db=anguillaguide
[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[EMAIL PROTECTED] mysql]# cat /etc/my.cnf
[mysqld]
old-passwords
max_connections = 500
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 2M
read_buffer_size = 2M
sort_buffer_size = 3M
table_cache = 1500
thread_cache_size = 128
wait_timeout = 14400
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
skip-innodb
log-bin=mysql-bin
server-id=1
[mysqld_safe]
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
Chris Mason
Anguilla
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 3/15/2005
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]