centos编译安装配置支持ssl加密的mysql replication
Saturday, February 20th, 2010参考文章:http://www.howtoforge.com/how-to-set-up-mysql-database-replication-with-ssl-encryption-on-centos-5.4 外国人写文章真严谨,步骤详尽,讲解明了,我除了安装方式使用了源代码编译,其余部分基本都是照做,操作步骤写在这里,仅做记录。 测试环境准备: 准备两台计算机,一台master,一台slave,配置随便,反正centos只安装字符界面,不需要太好配置,当然配置越低,编译安装速度越慢,如果你找不到计算机,手头只有一台计算机,那么用virtualbox虚拟然后搭网桥一样可以模拟一台局域网计算机,为了学习技术,有条件上,没有条件也要创造条件上! master服务器 192.168.90.216 centOS 5.3 x86_64 mysql-5.0.67 slave服务器 192.168.90.89 centOS 5.3 x86_64 mysql-5.0.67 编译安装mysql,主从服务器的操作都一样 tar zxvf mysql-5.0.67.tgz cd mysql-5.0.67 ./configure --prefix=/usr/local/mysql --sysconfdir=/etc --with-openssl --with-vio make make install 准备配置文件和启动脚本 cp support-files/my-medium.cnf /etc/my.cnf cp support-files/mysql.server /etc/rc.d/init.d/mysqld 设置自动启动 chmod 700 /etc/rc.d/init.d/mysqld chkconfig --add mysqld chkconfig --level 345 mysqld on 初始化授权表 cd /usr/local/mysql/bin ./mysql_install_db --user=mysql 启动mysql service mysqld start 加入环境变量 for i in *; do ln -s /usr/local/mysql/bin/$i /usr/bin/$i; done 给数据库root用户加上密码 mysqladmin -u root password 密码 登录mysql检查 mysql -u root -p Enter password: Welcome to the MySQL ...