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

边栏推荐
- Socket [5] - struct linker usage
- Record a murder case caused by ignoring the @suppresslint ("newapi") prompt
- Project training - clonemon
- The difference between equals and = =
- Idea pulls items from remote warehouse
- TypeScript-null和undefined
- Typescript namespace
- Basic use of typescripy class
- 嵌入式软件面试问题总结
- Anaconda+tensorflow most effective summary version (blood and tears summary of 6 reloads)
猜你喜欢

结果和目标出入太大?不妨借助目标管理精准直达目标!

Jupyter notebook code completion plug-in + Solution

node报错整理

Use of Excel to XML tool of TestLink

JS learning basics document Write write a line of text in the page

Solve ('You must install pydot (`pip install pydot`) and install graphviz (see...) '‘ for plot_ model..

Process control: process waiting (recycling child processes)

Reference implementation scheme of database database and table division strategy

盘它!用「飞项」轻松管理各类型项目

XXL task executor calls local project
随机推荐
Planning tasks for continuous automated testing
How to do well in empty state design? Look at this comprehensive summary
Introduction to the principles of linkedblockingqueue, arrayblockingqueue, synchronousqueue, concurrentlinkedqueue and transferqueue
DAMENG 数据库启停
Modulenotfounderror: no module named 'tensorboard in pytorch‘
Icml2022 interesting articles
Modifying field length in Oracle and postgrepsql
XXL task executor calls local project
Summary of force deduction questions
[the most complete ENSP [installation diagram] in history!]
使用 COCO 数据集训练 YOLOv4-CSP 模型
134. gas station
How many of the 50 questions about network knowledge can you answer correctly?
Project training - clonemon
Closure and minimum dependency in database
Testing firebase with postman
Thoroughly remember the difference between ImageView background and SRC
Process control: process waiting (recycling child processes)
Crawl Baidu Baipin dynamic page
怎么做好项目管理?学会这4个步骤就够了


