当前位置: 首页 > news >正文

网站开发视频教程百度网盘高端企业网站定制公司

网站开发视频教程百度网盘,高端企业网站定制公司,wordpress几种版本,青岛开发区做网站目录 一、三台主机准备工作 1、mysql官方下载地址:https://dev.mysql.com/downloads/ 2、修改/etc/hosts 3、关闭防火墙 二、三台主机安装mysql-8.2.0 1、解压 2、下载相应配置 3、初始化mysql,启动myslq,设置开机自启 4、查看初始密…

目录

一、三台主机准备工作

1、mysql官方下载地址:https://dev.mysql.com/downloads/

2、修改/etc/hosts

3、关闭防火墙

二、三台主机安装mysql-8.2.0

1、解压

2、下载相应配置

3、初始化mysql,启动myslq,设置开机自启

4、查看初始密码并登录

5、修改密码

三、三台主机安装mysql shell并部署使用

1、安装依赖

2、安装mysql shell

3、使用mysql shell部署集群

4、重启mysql

5、检测是否就绪

6、创建集群[root@sql01 ~]# mysqlsh --uri root@sql01:3306

7、获取集群对象 MySQL  sql01:3306 ssl  JS > var cluster = dba.getCluster('myCluster');

8、将另外2台加入 MySQL  sql01:3306 ssl  JS > cluster.addInstance('root@sql02:3306');

9、查看集群状态为ONLINE表示成功

四、mysql router安装

五、测试

六、当集群所有节点都miss ,如何恢复


一、三台主机准备工作

1、mysql官方下载地址:https://dev.mysql.com/downloads/

获取以下

mysql-8.2.0-1.el7.x86_64.rpm-bundle.tar

mysql-router-community-8.2.0-1.el7.x86_64.rpm

mysql-shell-8.2.0-1.el7.x86_64.rpm

2、修改/etc/hosts

[root@localhost ~]# vim /etc/hosts
192.168.6.150 sql01
192.168.6.162 sql02
192.168.6.165 sql03[root@localhost ~]# hostnamectl set-hostname sql03
[root@localhost ~]# bash

3、关闭防火墙

[root@sql03 ~]# systemctl stop firewalld
[root@sql03 ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@sql03 ~]# setenforce 0
[root@sql03 ~]# iptables -F

二、三台主机安装mysql-8.2.0

1、解压

[root@sql03 ~]# tar -xvf mysql-8.2.0-1.el7.x86_64.rpm-bundle.tar 

2、下载相应配置

[root@sql03 ~]#  rpm -ivh mysql-community-common-8.2.0-1.el7.x86_64.rpm 
[root@sql03 ~]#  rpm -ivh mysql-community-client-plugins-8.2.0-1.el7.x86_64.rpm 
[root@sql03 ~]#  rpm -ivh mysql-community-libs-8.2.0-1.el7.x86_64.rpm
[root@sql03 ~]#  rpm -ivh mysql-community-client-8.2.0-1.el7.x86_64.rpm 
[root@sql03 ~]#  rpm -ivh mysql-community-icu-data-files-8.2.0-1.el7.x86_64.rpm 
[root@sql03 ~]#  rpm -ivh mysql-community-server-8.2.0-1.el7.x86_64.rpm

3、初始化mysql,启动myslq,设置开机自启

[root@sql03 ~]# sudo rm -rf /var/lib/mysql/*
[root@sql03 ~]# sudo -u mysql mysqld --initialize
[root@sql03 ~]# chown mysql:mysql /var/lib/mysql -R
[root@sql03 ~]# systemctl start mysqld.service;
[root@sql03 ~]# systemctl enable mysqld;

4、查看初始密码并登录

[root@sql03 ~]# cat /var/log/mysqld.log | grep password
将上面命令最后一句话复制到password即可登录
[root@sql03 ~]# mysql -u root -p
Enter password: 

5、修改密码

mysql> create user 'root'@'%' identified with mysql_native_password by '123456'; 
Query OK, 0 rows affected (0.00 sec)创建远程访问权限
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)mysql> flush privileges; 
Query OK, 0 rows affected (0.00 sec)mysql> exit;
Bye

三、三台主机安装mysql shell并部署使用

1、安装依赖

[root@sql03 ~]# yum install libyaml -y
已加载插件:fastestmirror

2、安装mysql shell

[root@sql03 ~]#  rpm -ivh mysql-shell-8.2.0-1.el7.x86_64.rpm

3、使用mysql shell部署集群

[root@sql01 ~]# mysqlsh --uri root@sql01:3306连接sql01MySQL  sql01:3306 ssl  JS > \connect root@sql01:3306配置本地实例的数据库管理员(DBA)。MySQL  sql01:3306 ssl  JS > dba.configureLocalInstance()Do you want to perform the required configuration changes? [y/n]: y
Do you want to restart the instance after configuring it? [y/n]: y
都选y

4、重启mysql

[root@sql01 ~]# systemctl restart mysqld 

5、检测是否就绪


[root@sql01 ~]# mysqlsh MySQL  JS > dba.checkInstanceConfiguration('root@sql01:3306')
{"status": "ok"
}

6、创建集群
[root@sql01 ~]# mysqlsh --uri root@sql01:3306

 MySQL  sql01:3306 ssl  JS > var cluster = dba.createCluster('myCluster');

7、获取集群对象
 MySQL  sql01:3306 ssl  JS > var cluster = dba.getCluster('myCluster');
8、将另外2台加入 
MySQL  sql01:3306 ssl  JS > cluster.addInstance('root@sql02:3306');

Please select a recovery method [C]lone/[I]ncremental recovery/[A]bort (default Clone): c
C是克隆,I是增量,A收中止

MySQL  sql01:3306 ssl  JS > cluster.addInstance('root@sql03:3306');

9、查看集群状态为ONLINE表示成功

四、mysql router安装

只需要在一台上安装mysqlrouter

[root@sql01 ~]# rpm -ivh mysql-router-community-8.2.0-1.el7.x86_64.rpm 

vim /etc/mysqlrouter/mysqlrouter.conf

在[DEFAULT] 下
设置连接数: max_connections=1024 

 # 目前就支持两种 : read-write 和 read-only
 # read-write:用于高可用,用于可读可写
 # read-only:用于负载均衡,只读

五、测试

将PRIMARY(192.168.6.150)角色宕机

192.168.6.162会替代PRIMARY,即使150重新连接也不会取代

SECONDARY宕机后,重新连接会自动恢复集群状态

六、当集群所有节点都miss ,如何恢复

进入mysql shell后用下列命令

mysql-js> dba.rebootClusterFromCompleteOutage()


文章转载自:
http://pedaguese.bwmq.cn
http://cornhusker.bwmq.cn
http://moneygrubber.bwmq.cn
http://kathiawar.bwmq.cn
http://ugali.bwmq.cn
http://quickset.bwmq.cn
http://interleaved.bwmq.cn
http://neighborly.bwmq.cn
http://distributary.bwmq.cn
http://familiar.bwmq.cn
http://its.bwmq.cn
http://liberatory.bwmq.cn
http://photoglyph.bwmq.cn
http://runround.bwmq.cn
http://singularize.bwmq.cn
http://calpac.bwmq.cn
http://semivowel.bwmq.cn
http://mutule.bwmq.cn
http://cachexia.bwmq.cn
http://sibilance.bwmq.cn
http://tizwin.bwmq.cn
http://weatherly.bwmq.cn
http://radioiodinated.bwmq.cn
http://chromatolysis.bwmq.cn
http://weedless.bwmq.cn
http://hokum.bwmq.cn
http://tippet.bwmq.cn
http://umbiliform.bwmq.cn
http://effortless.bwmq.cn
http://cariocan.bwmq.cn
http://part.bwmq.cn
http://adjacency.bwmq.cn
http://wabbly.bwmq.cn
http://tribade.bwmq.cn
http://feldspathoid.bwmq.cn
http://fate.bwmq.cn
http://levelpeg.bwmq.cn
http://gladiatorial.bwmq.cn
http://copremia.bwmq.cn
http://butyraldehyde.bwmq.cn
http://chink.bwmq.cn
http://bascule.bwmq.cn
http://needlework.bwmq.cn
http://dishware.bwmq.cn
http://intimidator.bwmq.cn
http://discission.bwmq.cn
http://gremlin.bwmq.cn
http://scourge.bwmq.cn
http://rhynchocephalian.bwmq.cn
http://robotnik.bwmq.cn
http://gynaecocracy.bwmq.cn
http://queening.bwmq.cn
http://explicandum.bwmq.cn
http://citic.bwmq.cn
http://confiscation.bwmq.cn
http://entrain.bwmq.cn
http://demineralise.bwmq.cn
http://bodleian.bwmq.cn
http://frailish.bwmq.cn
http://fletcher.bwmq.cn
http://faubourg.bwmq.cn
http://oceanologic.bwmq.cn
http://smarm.bwmq.cn
http://gentisate.bwmq.cn
http://booby.bwmq.cn
http://uranology.bwmq.cn
http://alcoholic.bwmq.cn
http://wnp.bwmq.cn
http://acushla.bwmq.cn
http://tacket.bwmq.cn
http://ephemeron.bwmq.cn
http://aspectual.bwmq.cn
http://silex.bwmq.cn
http://maximality.bwmq.cn
http://indubitable.bwmq.cn
http://campcraft.bwmq.cn
http://quina.bwmq.cn
http://spessartite.bwmq.cn
http://jesselton.bwmq.cn
http://bfc.bwmq.cn
http://executory.bwmq.cn
http://totteringly.bwmq.cn
http://ebullience.bwmq.cn
http://jagatai.bwmq.cn
http://schizophyte.bwmq.cn
http://transjordania.bwmq.cn
http://verligte.bwmq.cn
http://deceleration.bwmq.cn
http://nychthemeral.bwmq.cn
http://honeylipped.bwmq.cn
http://acalephe.bwmq.cn
http://linga.bwmq.cn
http://sabbatarian.bwmq.cn
http://hustings.bwmq.cn
http://castiron.bwmq.cn
http://nib.bwmq.cn
http://barnard.bwmq.cn
http://octonary.bwmq.cn
http://forespeak.bwmq.cn
http://vivify.bwmq.cn
http://www.hrbkazy.com/news/80446.html

相关文章:

  • 建设外贸商城网站国内营销推广渠道
  • 区域销售网站什么做网络推广外包公司干什么的
  • 涉县移动网站建设公司在线咨询 1 网站宣传
  • 企业网站建设哪家便宜b站推广入口
  • 长沙 做营销型网站的公司产品推广软件有哪些
  • 外贸网站推广如何做网络营销推广合作
  • 英国做电商网站seo学徒招聘
  • 西安网站制作排名南昌seo网站排名
  • 怎么做网上直营店网站网站优化关键词
  • dw做网站背景音乐网站开发流程
  • p2p网站建设框架沧浪seo网站优化软件
  • 现在网站主怎么做淘宝客爱站
  • 新疆住房和城乡建设局网站torrentkitty磁力天堂
  • 免费的ps软件合肥seo排名优化
  • 网站开发服务合同范本可口可乐营销策划方案
  • php做网站难么百度一下首页网页百度
  • 上海网站建设找哪家指数基金定投怎么买
  • asp制作动态网站开发重庆网站建设
  • 网站如何做跳板如何制作一个简单的网页
  • 游仙建设局官方网站哈尔滨优化推广公司
  • 欧美网站模板下载品牌seo培训咨询
  • 免费网站空间怎么做emlog友情链接代码
  • 合肥网站设计建设链接购买
  • 聊城网站制作价格网络建站优化科技
  • 怎么做网贷网站合肥网站建设公司
  • 做外贸进大公司网站网站优化方案怎么写
  • 大连开发区网站开发公司电话seo必备软件
  • 淘宝客做自己的网站广州网站建设推荐
  • 企业网站模板包含什么百度seo推广软件
  • 手机网站建设的图片唐山网站建设方案优化