当前位置:网站首页>Heartbeat uses NFS to make MySQL highly available based on CRM
Heartbeat uses NFS to make MySQL highly available based on CRM
2022-06-30 20:13:00 【Brother Xing plays with the clouds】
The experimental environment here is the same as that in the previous section http://www.linuxidc.com/Linux/2014-03/98673.htm First stop the node resource , Then delete
NFS Shared storage node configuration : # mkdir /mydata # vim /etc/exports /mydata 192.168.100.0/24(no_root_squash,rw) # service nfs restart # groupadd -g 3306 MySQL # useradd -g 3306 -u 3306 -s /sbin/nologin -M mysql # chown -R /mydata notes : Here you must nfs Shared resources are set to no_root_squash, otherwise mysql Service failed to start
Node Node configuration : ad locum node1 And node2 The configuration of is exactly the same
# groupadd -g 3306 mysql # useradd -g 3306 -u 3306 -s /sbin/nologin -M mysql # mkdir /mydata # tar xvf mysql-5.5.22-linux2.6-i686.tar.gz -C /usr/local/ # cd /usr/local/ # ln -s mysql-5.5.22-linux2.6-i686/ mysql # cd mysql # chown -R root:mysql . # mount -t nfs 192.168.100.9:/mydata /mydata # cd /usr/local/mysql/ # scripts/mysql_install_db --user=mysql --datadir=/mydata/data # ln -s /usr/local/mysql/bin/* /usr/bin/ # cp support-files/my-large.cnf /etc/my.cnf # vim /etc/my.cnf datadir = /mydata/data innodb_file_per_table = 1 # cp support-files/mysql.server /etc/init.d/mysqld # chkconfig --add mysqld # chkconfig mysqld off # service mysqld start # scp /ect/my.cnf node2:/etc # scp /etc/init.d/mysqld node2:/etc/init.d # service mysqld start # mysql
test mysql Whether it is in normal use mysql> create database mydb; mysql> grant all privileges on *.* to [email protected]'%' identified by 'asdasd'; mysql> flush privileges; # service mysqld stop # service heartbeat start # ssh node2 'service heartbeat start' # hb_gui Be careful 1. To use the above command, you must DC Connect and configure , Otherwise, it will fail to start , Check which node is DC, We can use the command crm_mon 2. After the test is completed, the... Of each node must be mysql Set to power on / off , And uninstall nfs Shared memory Add groups and resources , Use the steps in the previous section :
thus , We can get it from any one mysql The client logs in to us mysql High availability colony 了
Test in nfs The server Log on mysql colony , See if it's all right : [[email protected] ~]# mysql -uroot -h 192.168.100.10 -p mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mydb | | mysql | | performance_schema | | test | +--------------------+ 5 rows in set (0.01 sec)
mysql> use mydb; Database changed mysql> create table test1 ( -> id int not null auto_increment primary key, -> name varchar(20) not null -> ); Query OK, 0 rows affected (0.11 sec)
边栏推荐
- 8 - 函数
- Pytorch implements the calculation of flops and params
- 25:第三章:开发通行证服务:8:【注册/登录】接口:接收并校验“手机号和验证码”参数;(重点需要知道【利用redis来暂存数据,获取数据的】的应用场景)(使用到了【@Valid注解】参数校验)
- 分析超700万个研发需求发现,这八大编程语言才是行业最需要的
- [try to hack] windows system account security
- neo4j load csv 配置和使用
- 十分之坑,tar命令解压文件的时候竟然不能解析英文括号“()”
- Primary school, session 3 - afternoon: Web_ sessionlfi
- 广州股票开户选择手机办理安全吗?
- Exness: the final value of US GDP unexpectedly accelerated to shrink by 1.6%
猜你喜欢

线下门店为什么要做新零售?

分析超700万个研发需求发现,这八大编程语言才是行业最需要的

Primary school, session 3 - afternoon: Web_ xxe

屏幕显示技术进化史

To eliminate bugs, developers must know several bug exploration and testing artifacts.

如何做好测试用例设计
Application of JDBC in performance test

Data intelligence - dtcc2022! China database technology conference is about to open

8 - 函数

Cv+deep learning network architecture pytoch recurrence series basenets (backbones) (I)
随机推荐
PS2手柄-1「建议收藏」
Static classes use @resource annotation injection
Source code analysis of redis ziplist compressed list
Filebeat自定义index和fields
十分之坑,tar命令解压文件的时候竟然不能解析英文括号“()”
Data intelligence - dtcc2022! China database technology conference is about to open
Solution to rollback of MySQL database by mistake deletion
C语言:hashTable
DNS服务器搭建、转发、主从配置
屏幕显示技术进化史
PostgreSQL heap堆表 存储引擎实现原理
NLP 论文领读|文本生成模型退化怎么办?SimCTG 告诉你答案
DELL R720服务器安装网卡Broadcom 5720驱动
CADD course learning (2) -- target crystal structure information
exness:流动性系列-流动性清洗和反转、决策区间
Primary school, session 3 - afternoon: Web_ sessionlfi
Audio and video architecture construction in the super video era | science and Intel jointly launched the second season of "architect growth plan"
启动PHP报错ERROR: [pool www] cannot get uid for user ‘@[email protected]’
Lambda 表达式原理分析学习(2022.06.23)
Client请求外部接口标准处理方式