当前位置:网站首页>[ubuntu-mysql 8 installation and master-slave replication]
[ubuntu-mysql 8 installation and master-slave replication]
2022-06-30 09:42:00 【Shallow look】
List of articles
One 、 install
1.1 linux Universal installation
Linux install MySQL8.x The detailed steps
notes :
About chkconfig --add mysql , service mysql I won't support it chkconfig Solutions for
Ubuntu Lower installation sysv-rc-conf Report errors :“E: Unable to locate package sysv-rc-conf“
1.2 apt install
05-ubuntu install mysql8
Ubuntu 18.04 apt install MySQL8.0
mysql Use apt After successful installation :
1.2.1 Set up mysql Service starts automatically
systemctl enable mysql
1.2.2 to grant authorization mysql Remote connection
Mysql 8.0.13 Turn on Remote Access
Two 、 Master slave copy
Main library 【ubuntu18.04 mysql8.0.29】
Slave Library 【windows mysql8.0.26】
2.1 Main library
2.1.1 Main library configuration
File path :/etc/mysql/mysql.conf.d/mysqld.cnf
Add configuration item :
[mysqld]
log-bin = mysql-bin #[ must ] Enable binary logging
server-id = 1
2.1.2 Create an account for the slave Library
notes :mysql Version inconsistency , The statement is slightly different , Here is mysql8.0.29
CREATE USER 'slave'@'%' IDENTIFIED WITH 'mysql_native_password' BY '123456';
GRANT REPLICATION SLAVE ON *.* TO 'slave'@'%';
The above instruction creates a user slave, The password for 123456, And give replication permission .
2.2 Slave Library
2.2.1 Configuration from library
From library yes windows
route : stay mysql Install under directory my.ini file
[mysqld]
#[ must ] The server is unique ID
server-id=2
restart mysql service
2.2.2 Modify the synchronization database
CHANGE MASTER TO MASTER_HOST='192.168.1.101', # master server IP
MASTER_PORT=3306, # Primary server port
MASTER_USER='user1', # Primary server user name
MASTER_PASSWORD='userpwd', # Master server user password
MASTER_LOG_FILE='mysql-bin.000001', # Log file name , Get method look down
MASTER_LOG_POS=2235; # Also get from the following method
start-up SLAVE process :
start slave;
display information :
show slave status\G
Reference resources :Windows The structures, mysql Distributed master-slave database
边栏推荐
- Idea shortcut key settings
- qmlplugindump executable not found.It is required to generate the qmltypes file for VTK Qml
- Design of mfc+mysql document data management system based on VS2010
- Alibaba billion concurrent projects in architecture
- Express file download
- (zero) most complete JVM knowledge points
- Redis docker master-slave mode and sentinel
- Microsoft. Bcl. Async usage summary -- in Net framework 4.5 project Net framework version 4.5 and above can use async/await asynchronous feature in C 5
- RPC understanding
- OCX child thread cannot trigger event event (forward)
猜你喜欢

Clickhouse installation (quick start)

桂林 穩健醫療收購桂林乳膠100%股權 填補乳膠產品線空白

(zero) most complete JVM knowledge points

NTP of Prometheus monitoring_ exporter

AutoUpdater. Net client custom update file

Pytorch graduate warm LR installation

Microsoft. Bcl. Async usage summary -- in Net framework 4.5 project Net framework version 4.5 and above can use async/await asynchronous feature in C 5

2021-10-20

12. problem set: process, thread and JNI architecture

Tutorial for beginners of small programs day01
随机推荐
Net framework system requirements
Create thread pool demo
Flutter 0001, environment configuration
11. customize hooks
Couldn't load this key (openssh ssh-2 private key (old PEM format))
单片机 MCU 固件打包脚本软件
八大排序(一)
Pipe pipe --namedpipe and anonymouspipe
QR code generation and analysis
Review the old and know the new
Redis docker master-slave mode and sentinel
I once met a girl whom I most wanted to take care of all my life. Later... No later
Notes on masking and padding in tensorflow keras
JVM tuning tool commands (notes)
MySQL-- Entity Framework Code First(EF Code First)
小程序开发踩坑之旅
AutoUpdater. Net client custom update file
Idea setting automatic package Guide
Solution to pychart's failure in importing torch package
Deep Learning with Pytorch - autograd