Академический Документы
Профессиональный Документы
Культура Документы
(D61920GC10)
Date Generated: 27-May-10
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
shell> vi mysql-bin.index
03 12 Original
Lab 3-B, Step 1. Setup the master using the following steps:
shell> vi /etc/my.cnf
[mysqld]
log-bin=mysql-bin
server-id=123
mysql> QUIT;
Revision
Details added:
shell> vi /etc/my.cnf
[mysqld]
log-bin=mysql-bin
server-id=200
binlog_format=mixed
shell> scp
root@master_machine_ip_address:/tmp/dumpfile.sql /tmp
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
As root user logged into the slave server, create the following non-super user:
Revision
Details added:
mysql> QUIT;
shell> scp
root@master_machine_ip_address:/tmp/dumpfile.sql /tmp
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
Details added:
Revision
In the Oracle University classrooms, it is crucial to remain a network connection
to the machines at all times. The original HA lab was unacceptable because it
asked the student to disconnect the system from the network. The following steps
are crucial to ensure that the students can simulate disconnecting the system from
the network.
2. Create a virtual IP address that you will use during the labs in this course.
shell> /labs/start_virtual_ip.sh
3. View the details for the virtual IP that was created.
shell> ifconfig eth0:1
______________________________________________
Revision
hostname=192.168.2.1 (Replace IP with inet address obtained in step 1.4)
04 9 Original
Lab 4-B, Step 8. Add in a section for one data node
Revision
[NDBD]
hostname=192.168.2.1 (Replace IP with inet address obtained in step 1.4)
04 9 Original
Revision
Add the hostname to the [NDBD] section also
[NDBD]
hostname=192.168.2.1 (Replace IP with inet address obtained in step 1.4)
04 9 Original
Lab 4-B, Step 10. Add in a section for the MySQL server
Revision
Add the hostname to the [MYSQLD] section also
[MYSQLD]
hostname=192.168.2.1 (Replace IP with inet address obtained in step 1.4)
04 9 Original
Lab 4-B, Step 11. Verify you have defined everything properly
Revision
The config.ini file should look like the configuration below (replacing the IP with
the inet address obtained in step 1.4)
[NDB_MGMD]
hostname=192.168.2.1
datadir=/var/lib/mysql-cluster
[NDBD DEFAULT]
NoOfReplicas=2
datadir=/var/lib/mysql-cluster
[NDBD]
hostname=192.168.2.1
[MYSQLD]
hostname=192.168.2.1
04 20 Original
Revision
In this lab, two systems will be used to create a cluster. You will need to use the
virtual IP addresses for each of the systems used. It is important to use the eth0:1
______________________________________________
04 20 Original
Lab 4-G, Step 2b. Create the new config.ini defining the cluster on the system
with the management server
Revision
Choose which machine will be the Cluster Management Server and label this
machine server A. On server A, edit the /var/lib/mysql-cluster/config.ini file
to contain the following text:
[NDB_MGMD]
hostname=192.168.2.1 (Server A Virtual IP Address)
datadir=/var/lib/mysql-cluster
[NDBD DEFAULT]
NoOfReplicas=2
datadir=/var/lib/mysql-cluster
[NDBD]
hostname=192.168.2.1 (Server A Virtual IP Address)
[MYSQLD]
hostname=192.168.2.1 (Server A Virtual IP Address)
[MYSQLD]
hostname=190.145.45.15 (Server B Virtual IP Address)
04 20 Original
Revision
On server A, edit the /etc/my.cnf file to include the following:
[ndbd]
connect-string=192.168.2.1 (Server A Virtual IP Address)
[ndb_mgm]
connect-string=192.168.2.1 (Server A Virtual IP Address)
[ndb_mgmd]
config-file=/var/lib/mysql-cluster/config.ini
[mysqld]
ndbcluster
ndb-connectstring=192.168.2.1 (Server A Virtual IP Address)
04 21 Original
Lab 4-G, Step 12. Restart the cluster, verify it is restarted and the data is still
present. Disable the network (either pull the network cable, or use ifconfig eth0
down) on the non-management server machine.
Revision
On server B, disable the network by issuing the following command ONLY:
Revision
On server B, Re-enable the network by issuing the following command.
Revision
On server B, disable the network by issuing the following command ONLY:
Revision
On server B, Re-enable the network by issuing the following command.
Revision
At the completion of this lab perform the following steps.
1. In the MySQL client, issue the following commands:
mysql> DROP DATABASE world;
mysql> CREATE DATABASE world;
mysql> USE world;
mysql> SOURCE /labs/world.sql
Revision
The line which states, uncomment bcast eth0, should use eth0:1 instead of eth0.
Make the change in the ha.cf file to reflect this.
06 15 Original
Lab 6-B, step 4. Edit the haresources file and perform the following action. Add a
line:
Revision
The virtual_ip_address should be the IP address associated with eth0:1.
Revision
On the first host machine (hostname1), turn off network connection by issuing the
following command ONLY:
Revision
On the first host machine (hostname1), turn on the network connection by issuing
the following command: