当前位置:网站首页>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

边栏推荐
- TypeScript-分布式条件类型
- Typescript distributed condition type
- How to do well in empty state design? Look at this comprehensive summary
- 自定义ViewGroup的知识点总结-持续更新
- AttributeError: module ‘tensorflow. compat. v2.__ internal__‘ has no attribute ‘register_ clear_ session_
- E regression test of this featured app
- Pg/oracle database ASCII code to string custom function
- Solve notimplementederror: layer XX has arguments in`__ init__` and therefore must override `get_ config`
- XXL task executor calls local project
- Uniapp plug-in development
猜你喜欢

记一次忽略@SuppressLint(“NewApi“)提示引发的血案

Figure seamless database integration tushare interface

这几个小工具也太好用了

The difference between equals and = =

Batch splice string

torch. Var (), sample variance, parent variance

Use of Excel to XML tool of TestLink

(the slow download speed of cifar10 in torchvision has been solved) how to download and use torchvision import

2022.6.7 special student simulation

Anaconda related knowledge supplement (spyder+keras Library)
随机推荐
Pg/oracle database ASCII code to string custom function
These gadgets are also very easy to use
Entity class conversion cannot be reassigned
Magnifying mirror rendering
Sign in system design: how to draw the sign in function
[the most complete ENSP [installation diagram] in history!]
自定义ViewGroup的知识点总结-持续更新
Pypharm startup is stuck, loading project
Reference implementation scheme of database database and table division strategy
使用POSTMAN 测试firebase
盘它!用「飞项」轻松管理各类型项目
用 Keras/TensorFlow 2.9 创建深度学习模型的方法总结
The difference between & & and &
结果和目标出入太大?不妨借助目标管理精准直达目标!
Socket [5] - struct linker usage
How to make hyperlinks in RichTextBox- How can I make a hyperlink work in a RichTextBox?
字符设备驱动程序之异步通知机制
Modifying field length in Oracle and postgrepsql
用飞项进行目标管理,不做职场上的“无头苍蝇”
Layout of code setting constraintlayout_ constraintDimensionRatio


