HA: MySQL
rpm -ivh MySQL*.rpm : 安裝mysql的RPM包,包括Server、Client、Develmysql
一、拷貝數據目錄
mv /var/lib/mysql /drbddata/mysql
二、配置my.cnf
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
vi /etc/my.cnf
[client]
#socket = /var/lib/mysql/mysql.sock
socket = /drbddata/mysql/mysql.sock
[mysqld]
#socket = /var/lib/mysql/mysql.sock
socket = /drbddata/mysql/mysql.sock
三、配置/etc/init.d/mysql
vi /etc/init.d/mysql
sql
#datadir=/var/lib/mysql
datadir=/drbddata/mysqlsocket