当前位置:网站首页>Installing MySQL and cluster operation on virtual machine in Linux system
Installing MySQL and cluster operation on virtual machine in Linux system
2022-06-11 08:21:00 【WldKid_ zxy】
Linux Online installation
One 、mysql Online installation
1. Check to see if... Is already installed Mysql
rpm -qa | grep mysql
No directories 
If you see something , You can use the following command to delete (xxx For the full name of the file ) rpm -e xxx
2. Installation steps ( According to the order Input 1-4 command )
1.yum -y install wget
2.wget http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
3.yum -y install mysql57-community-release-el7-10.noarch.rpm
4.yum install mysql-community-server --nogpgcheck
5.service mysqld restart
*6(). verification ps -ef|grep mysql
The display is successful 
3. Change Password 
Enter the command in turn
1.set global validate_password_length=4;
2.alter user '[email protected]' identified by '199957'
3.GRANT ALL PRIVILEGES ON *.* TO '[email protected]''%' identified by '199957'
4.flush privileges;
Two 、 colony
-I/O Threads : Zhou Zhu monitors the two leaders of the master or the point bni og journal , Once the master node sends the master handover change , that ijo The thread reads the change , then I/O The thread writes the read content to our binary relay log Re
lay in .( Relay logs and binlog Keep the log consistent , And the default is none , Need configuration )
-SQL Threads : Monitor the relay log of the slave node , Once the relay log changes , that SQL The thread reads , analysis , Then redo it from the library .

1. Configure the host
1.1 Edit the file vim. /etc/my.cnf
Insert... At the end
log-bin=mysql-bin
server-id=214
1.2. restart Mysql service mysqld restart
1.3 Create a user on the host
2. Configure slave
2.1 Edit the file vim. /etc/my.cnf*
# relay logs
server-id=111
relay-log=relay-log
relay-log-index=relay-log.index

2.2 Restart slave mysql service mysqld restart
3. Configure the parameters of the template node
3.1 Check the information 
3.2 Log in to the slave mysql Type in the command
change master to master_host=‘192.168.23.57’ ,master_user=‘txdev’,master_password=‘txdev’,master_log_file=‘mysql-bin.000001’,master_log_pos=1181;
master_user=‘txdev’,master_password=‘txdev’, The user name and password created by the host
3.3 stay mysql From the plane Restart the replication thread
start slave
show slave status\G;

4.navicar Threaded connection

4.1 verification
a. stay Linux Create... Under connection j09 database
b. Refresh
c. Linux58 Automatically create and Linux Like goose database 
========= Cluster diagram

边栏推荐
- Post - payload of interface test
- Dameng database startup and shutdown
- Sign in system design: how to draw the sign in function
- How to make hyperlinks in RichTextBox- How can I make a hyperlink work in a RichTextBox?
- In an activity, view postdelay will cause memory leakage, but will not affect the life cycle execution of the activity.
- TypeScript-枚举
- 如何开始参与开源社区
- SylixOS SD设备驱动开发
- Label the mask image not obtained through labelme
- 使用POSTMAN 测试firebase
猜你喜欢

【1】 Integrated learning: quickly understand Integrated Learning

Uniapp plug-in development

Introduction to guava cache usage

Collation of basic knowledge of intermediate development of Andrews (for interview)

Solution to the occurrence interval (space) of latex manual numbering documents

2022.6.6 extra long growth simulation

torch. Var (), sample variance, parent variance
![[the most complete ENSP [installation diagram] in history!]](/img/1a/7d50d6e5c06a5e3ce6acab16ddb638.jpg)
[the most complete ENSP [installation diagram] in history!]

These gadgets are also very easy to use

用飞项进行目标管理,不做职场上的“无头苍蝇”
随机推荐
The difference between & & and &
Idea pulls items from remote warehouse
Anaconda+tensorflow most effective summary version (blood and tears summary of 6 reloads)
XXL task executor calls local project
如何开始参与开源社区
Project training - clonemon
Collation of basic knowledge of intermediate development of Andrews (for interview)
Typescript enumeration
Mongodb--- automatically delete expired data using TTL index
Logical implication of functional dependence
Reference implementation scheme of database database and table division strategy
Node error report sorting
How to make hyperlinks in RichTextBox- How can I make a hyperlink work in a RichTextBox?
What does it mean to buy a single-mode, dual-mode and Rechargeable Wireless Mouse
TypeScript-null和undefined
TypeScript-类型保护
Post - payload of interface test
Empty difference between postgrepsql and Oracle
Training yolov4 CSP model using coco dataset
Typescript keyboard mapping


