Chapter 18 . Replication 531 databases that you want to replicate. From a shell within the database directory, issue the following command: tar -cvpf database.tar Transfer the resulting file to the slave server(s); unarchive (unzip) that file within the database directory. Your servers will now start with the same data. (This is an important step, as I show later in this chapter.) Once you ve taken the snapshot, stop the MySQL server on the master and restart it. Congratulations, you now have a master server in a replication set configured for MySQL. On the slave, the process involves adding the following lines to the MySQL configuration file, again to the [mysqld]section: master-host=192.168.1.71 master-user=replicate master-password=fgbpr2 server-id=2 Substitute the host, user, and password values appropriate for your installation. Stop the restart the MySQL server on the slave. You should now have a simple replication set running between two MySQL servers. To test the configuration, issue the following command from within the MySQL CLI on the slave: SHOW SLAVE STATUS; You should see output similar to that in Figure 18-2. Figure 18-2: Issuing the SHOW SLAVE STATUS command on a slave server should result in output similar to this if the slave is running.
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.
This entry was posted
on Monday, May 26th, 2008 at 7:59 am and is filed under Domain.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.