欢迎来到天天文库
浏览记录
ID:37711991
大小:39.83 KB
页数:8页
时间:2019-05-29
《Mysql数据库安装及生产环境下主从库同步配置》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Mysql数据库安装及生产环境下主从库同步配置第8页目录1安装Mysql数据库22生产环境下MySQL数据库主从同步配置52.1主数据库配置…………………………………………………………………………………………………...52.2从数据库配置……………………………………………………………………………………………………53监控服务器63.1监控主数据库服务器…………………………………………………………………………………………...63.2监控从数据库服务器………………………………………………………………………………………...6第8页1安装Mysql数据库安装环境:系统:Ce
2、ntOS-6.6-x86_64数据库:MySQL-server-5.5.42-1.el6.x86_64;MySQL-client-5.5.42-1.el6.x86_641.SSH方式登录到MySQL服务器2.创建存放安装文件的目录[root@localhost/]#mkdir-p/sw/mysql553.上传安装文件到上一步创建的目录4.检查是否已安装过MySQL[root@localhost/]#rpm-qa
3、grep-imysqlMySQL-client-5.5.42-1.el6.x86_64MySQL-server-5.5.42-1.el6.x86_645.如果已安
4、装则移除,否则请跳过此步[root@localhost/]#yum-yremoveMySQL-server-5.5.42-1.el6.x86_64[root@localhost/]#yum-yremoveMySQL-client-5.5.42-1.el6.x86_64删除老版本mysql的开发头文件和库rm-fr/usr/lib/mysqlrm-fr/usr/include/mysqlrm-fr/var/lib/mysqlrm-f/etc/my.cnf6.安装MySQL[root@localhost/]#cd/sw/mysql55/[root@localhostmysql
5、55]#rpm-ivhMySQL-server-5.5.42-1.el6.x86_64.rpmPreparing...###########################################[100%]1:MySQL-client###########################################[100%][root@localhostmysql55]#rpm-ivhMySQL-client-5.5.42-1.el6.x86_64.rpmPreparing...#######################################
6、####[100%]1:MySQL-server###########################################[100%]7.配置MySQL[root@localhostmysql55]#cp/usr/share/mysql/my-small.cnf/etc/my.cnf[root@localhostmysql55]#vi/etc/my.cnf[client]#password=your_passwordport=8819socket=/var/lib/mysql/mysql.sockdefault-character-set=utf8[mysql
7、d]port=8819socket=/var/lib/mysql/mysql.socklower_case_table_names=1第8页skip-external-lockingkey_buffer_size=384Mmax_allowed_packet=8Mtable_open_cache=512sort_buffer_size=2Mread_buffer_size=2Mread_rnd_buffer_size=8Mmyisam_sort_buffer_size=64Mthread_cache_size=8Mquery_cache_size=32M#Trynumbe
8、rofCPU's*2forthread_concurrencythread_concurrency=16max_connections=10000character-set-server=utf8wait_timeout=31536000interactive_timeout=31536000user=mysqldefault_storage_engine=InnoDBpid-file=/var/lib/mysql/mysql.piddatadir=/var/lib/mysql/log_bin=/var/lib/mysql/m
此文档下载收益归作者所有