DBA专题
DBA授课
DBA公开课
DBA训练营三天
01.Mysql基础入门-数据库简介
02.Mysql基础入门-部署与管理体系
03.MySQL主流版本版本特性与部署安装
04.Mysql-基础入门-用户与权限
05 MySQL-SQL基础2
06 SQL高级开发-函数
07 MySQL-SQL高级处理
08 SQL练习 作业
09 数据库高级开发2
10 Mysql基础入门-索引
11 Mysql之InnoDB引擎架构与体系结构
12 Mysql之InnoDB存储引擎
13 Mysql之日志管理
14 Mysql备份,恢复与迁移
15 主从复制的作用及重要性
16 Mysql Binlog Event详解
17 Mysql 主从复制
18 MySQL主从复制延时优化及监控故障处理
19 MySQL主从复制企业级场景解析
20 MySql主从复制搭建
21 MySQL高可用-技术方案选型
22 MySQL高可用-MHA(原理篇)
23 MySQL MHA实验
24 MySQL MGR
25 部署MySQL InnoDB Cluster
26 MySQL Cluster(MGR)
27 MySQL ProxySQL中间件
相信可能就有无限可能
-
+
首页
DBA授课
线上机器,授课看下是否可用 172.21.58.41:20160 172.21.58.42:20160 172.21.58.56:20160 线上机器预操作 ```bash 172.21.188.36 hostname master01 hostname db-tdptest-3-surd-ptest 172.21.188.19 hostname slave02 hostname ssp-tdptest-ptest-1-cgoz9 172.21.188.37 db-tdptest-2-fdkc-ptest hostname slave01 hostname db-tdptest-2-fdkc-ptest ``` 新节点 ```bash mkdir -p /chj/class/{backup,data,dowland} yum install -y libaio-devel useradd mysql mkdir -p /chj/class/data/mysql3306/data/{etc,log,tmp,var} cd /chj/class/dowland/ chown -R mysql.mysql /chj/class/data/ 上传Mysql tar xf mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz mv mysql-5.7.30-linux-glibc2.12-x86_64 mysql-5.7.30 #备份复制 #恢复 prepare innobackupex --apply-log /chj/class/backup/backup_3306 #恢复 拷贝数据文件 innobackupex --defaults-file=/chj/class/data/mysql57/etc/my.cnf --move-back /chj/class/backup/backup_3306 chown -R mysql:mysql /chj/* mysqld --defaults-file=/chj/class/data/mysql3306/data/etc/my.cnf --user=mysql & cat /chj/class/backup/backup_3306/xtrabackup_info |grep binlog_pos binlog_pos = filename 'mysql-bin.000002', position '770' #构建主从 reset master; SET @@GLOBAL.GTID_PURGED =" 196c4617-3fa0-11ec-9cce-fa202013137b:1-1181, ddd2aab7-24ae-11ec-8406-fa202013137b:1-72978, e7e868e0-3faf-11ec-b6e6-fa202013137b:1-3" change master to master_host='172.21.188.37', MASTER_PORT=3306, master_user='repl', master_password='123' , MASTER_AUTO_POSITION=1; start slave; show slave status\\G #如果是初始化数据 ln -s /chj/class/dowland/mysql-5.7.30 /usr/local/mysql vim /etc/profile export PATH=/usr/local/mysql/bin:$PATH source /etc/profile mysqld --initialize-insecure --user=mysql --basedir=/chj/app/mysql-5.7.30-linux-glibc2.12-x86_64/ --datadir=/chj/data/mysql_test/ mkdir -p /chj/data/mysql_test/{log,etc,tmp} vim /etc/my.cnf [mysql] # CLIENT # no_auto_rehash port = 3306 socket = /chj/data/mysql_3306/tmp/mysql.sock default_character_set = utf8mb4 prompt = "\\u:\\p:\\d>" [mysqld] user = mysql port = 3306 default_storage_engine = InnoDB character_set_server = utf8mb4 init_connect = 'SET NAMES utf8mb4' transaction_isolation = REPEATABLE-READ basedir = /chj/app/mysql-5.7.30-linux-glibc2.12-x86_64/ datadir = /chj/data/mysql_3306/var/ socket = /chj/data/mysql_3306/tmp/mysql.sock pid_file = /chj/data/mysql_3306/var/mysql.pid tmpdir = /chj/data/mysql_3306/tmp/ slave_load_tmpdir = /chj/data/mysql_3306/tmp/ ### LOGGING ### #log_error_verbosity = 2 log_error = /chj/data/mysql_3306/log/mysql.err general_log = 0 general_log_file = /chj/data/mysql_3306/log/mysql.log 9. 启动数据库 [root@ccsp-dbmgnt-binlogserver-1 mysql_3306]# /chj/app/mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqld_safe --defaults-file=etc/my.cnf --user=mysql & ``` ![img](https://spurious-tithonia-b18.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F32db563c-8ef2-4ec4-a129-e8e0c2fae494%2FUntitled.png?table=block&id=cf595591-49a1-4f8a-ad05-381bea9bc96c&spaceId=3a6958c4-305d-413c-8831-949d1584f030&width=2000&userId=&cache=v2)
李延召
2024年3月18日 19:24
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
分享
链接
类型
密码
更新密码