Results 1 to 6 of 6
Building a couple of mysql 5.0.77 servers for replication testing and eventual deployment. This is a very new concept for me and I have a couple of questions. 1) I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-14-2011 #1
Building a couple of mysql 5.0.77 servers for replication testing and eventual deployment. This is a very new concept for me and I have a couple of questions.
1) I am looking for any tutorials available if you know of anything good that will get me up and runnig fairly quick that would be awesome.
2) I am playing around trying to set up the master:slave and I get utter failure when I start the slave:
I have run the CAHNGE MASTER TO command and this does not work, I have edited the my.conf as follows for the slave and master:
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql old_passwords=1 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid server-id=1 log-bin=test-bin innodb_flush_log_at_trx_commit=1 sync_binlog=1Code:
mysqlmaster> SHOW MASTER STATUS; Empty set (0.00 sec)
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql old_passwords=1 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid server-id=2 log-bin=test-bin innodb_flush_log_at_trx_commit=1 sync_binlog=1Code:
mysqlslave> start slave; ERROR 1200 (HY000): The server is not configured as slave; fix in config file or with CHANGE MASTER TO
any ideas on why this is failing. all the forums and other web docs point to the server-id not being unique on each server but as you can see that isn't the case here.
- 06-15-2011 #2
- Join Date
- Nov 2007
- 06-28-2011 #3
That is a good tutorial, and the one I followed to originally setup the replication, problem being it wors the exact same the second time I watch it and follow it. I still get the following in the master when I run show master status:
mysql> show master status; Empty set (0.00 sec)
- 06-28-2011 #4
- Join Date
- Nov 2007
- 06-28-2011 #5
Found the problem, had to swap the position on a couple of lines in the my.cnf.
Thanks for the help with this, now on to clustering and HA
- 06-28-2011 #6
Actually I do have another question, though I may get the answer upon my further reading.
If I am to set up replication on a database that is already created and has data in it, will the slave be brought up to date with the existing info upon initialization of the replication or will I need to do a dump of the master db and put that on the slave prior to starting replication ( i.e. have identical data sets prior to beginning)?