Skip to content

Commit ba932ab

Browse files
committed
java
1 parent ecded28 commit ba932ab

File tree

201 files changed

+2096
-1851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+2096
-1851
lines changed

architect/appendix.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<a xmlns="" href="//netkiller.github.io/">简体中文</a> |
44
<a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> |
55
<a xmlns="" href="/journal/index.html">杂文</a> |
6+
<a xmlns="" href="https://github.com/netkiller">Github</a> |
67
<a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> |
78
<a xmlns="" href="https://edu.51cto.com/lecturer/1703915.html">51CTO学院</a> |
89
<a xmlns="" href="https://edu.csdn.net/lecturer/6423">CSDN程序员研修院</a> |
9-
<a xmlns="" href="https://github.com/netkiller">Github</a> |
1010
<a xmlns="" href="http://my.oschina.net/neochen/">OSChina 博客</a> |
1111
<a xmlns="" href="https://cloud.tencent.com/developer/column/2078">腾讯云社区</a> |
1212
<a xmlns="" href="https://yq.aliyun.com/u/netkiller/">阿里云栖社区</a> |

architect/author.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<a xmlns="" href="//netkiller.github.io/">简体中文</a> |
44
<a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> |
55
<a xmlns="" href="/journal/index.html">杂文</a> |
6+
<a xmlns="" href="https://github.com/netkiller">Github</a> |
67
<a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> |
78
<a xmlns="" href="https://edu.51cto.com/lecturer/1703915.html">51CTO学院</a> |
89
<a xmlns="" href="https://edu.csdn.net/lecturer/6423">CSDN程序员研修院</a> |
9-
<a xmlns="" href="https://github.com/netkiller">Github</a> |
1010
<a xmlns="" href="http://my.oschina.net/neochen/">OSChina 博客</a> |
1111
<a xmlns="" href="https://cloud.tencent.com/developer/column/2078">腾讯云社区</a> |
1212
<a xmlns="" href="https://yq.aliyun.com/u/netkiller/">阿里云栖社区</a> |

architect/cloud/RDS.html

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<a xmlns="" href="//netkiller.github.io/">简体中文</a> |
44
<a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> |
55
<a xmlns="" href="/journal/index.html">杂文</a> |
6+
<a xmlns="" href="https://github.com/netkiller">Github</a> |
67
<a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> |
78
<a xmlns="" href="https://edu.51cto.com/lecturer/1703915.html">51CTO学院</a> |
89
<a xmlns="" href="https://edu.csdn.net/lecturer/6423">CSDN程序员研修院</a> |
9-
<a xmlns="" href="https://github.com/netkiller">Github</a> |
1010
<a xmlns="" href="http://my.oschina.net/neochen/">OSChina 博客</a> |
1111
<a xmlns="" href="https://cloud.tencent.com/developer/column/2078">腾讯云社区</a> |
1212
<a xmlns="" href="https://yq.aliyun.com/u/netkiller/">阿里云栖社区</a> |
@@ -16,7 +16,7 @@
1616
<a xmlns="" href="//www.netkiller.cn/home/donations.html">打赏(Donations)</a> |
1717
<a xmlns="" href="//www.netkiller.cn/home/about.html">About</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.2. RDS MySQL</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03.html">上一页</a> </td><th width="60%" align="center">第 3 章 阿里云</th><td width="20%" align="right"> <a accesskey="n" href="日志服务.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=watch&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=fork&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;type=follow&amp;count=true&amp;size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td><td></td><td><a href="https://zhuanlan.zhihu.com/netkiller"><img src="/images/logo/zhihu-card-default.svg" height="25" /></a></td><td valign="middle"><a href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a><a href="https://www.zhihu.com/club/1241768772601950208">多维度架构</a></td><td></td><td></td><td></td><td></td></tr></table><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="RDS"></a>3.2. RDS MySQL</h2></div></div></div>
1818

19-
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm67338709216"></a>3.2.1. RDS MySQL =&gt; 本地 MySQL 数据库</h3></div></div></div>
19+
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm317397663248"></a>3.2.1. RDS MySQL =&gt; 本地 MySQL 数据库</h3></div></div></div>
2020

2121
<p>从 RDS 上下载的物理备份</p>
2222
<pre class="screen">
@@ -25,7 +25,7 @@
2525
hins19648946_data_20220913035432_qp.xb
2626

2727
</pre>
28-
<div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="idm67338705872"></a>3.2.1.1. MySQL 5.7</h4></div></div></div>
28+
<div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="idm317397659616"></a>3.2.1.1. MySQL 5.7</h4></div></div></div>
2929

3030
<p>安装依赖库</p>
3131
<pre class="screen">
@@ -80,7 +80,7 @@
8080
</pre>
8181
<p>去掉 --skip-grant-tables 选项,重启 MySQL,恢复完成。</p>
8282
</div>
83-
<div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="idm67338705616"></a>3.2.1.2. MySQL 8.0</h4></div></div></div>
83+
<div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="idm317397659360"></a>3.2.1.2. MySQL 8.0</h4></div></div></div>
8484

8585
<p>安装 percona-xtrabackup 恢复软件</p>
8686
<pre class="screen">
@@ -103,7 +103,7 @@
103103
</pre>
104104
</div>
105105
</div>
106-
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm67338695376"></a>3.2.2. 换表升级</h3></div></div></div>
106+
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm317397649184"></a>3.2.2. 换表升级</h3></div></div></div>
107107

108108
<p>当前表改名,然后再基于旧表创建新的空表</p>
109109
<pre class="screen">
@@ -118,6 +118,41 @@
118118
ALTER TABLE old_table_name RENAME TO new_table_name;
119119
CREATE TABLE old_table_name SELECT * FROM new_table_name WHERE ...;
120120

121+
</pre>
122+
</div>
123+
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm317397646624"></a>3.2.3. 导出 CSV 文件</h3></div></div></div>
124+
125+
<p>RDS 目前没有找到导出 csv 的方案,客服让使用 DMS 中的数据导出功能</p>
126+
<pre class="screen">
127+
128+
mysql&gt; show grants for 'root'@'%';
129+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
130+
| Grants for root@% |
131+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
132+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD '*F5200743F6F42815CB2DC833C98D6E7730F8E2E2' WITH GRANT OPTION |
133+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
134+
1 row in set (0.00 sec)
135+
136+
</pre>
137+
<p>查询未找到 FILE 权限,官网权限列表中也没有 https://help.aliyun.com/document_detail/146395.html</p>
138+
<pre class="screen">
139+
140+
mysql&gt; GRANT FILE ON *.* to neo@'%' identified by 'chen';
141+
Query OK, 0 rows affected (0.026 sec)
142+
143+
144+
</pre>
145+
<p>secure_file_priv 只要不是 null 即可,阿里云配置是 secure_file_priv = ''。</p>
146+
<pre class="screen">
147+
148+
mysql&gt; SHOW VARIABLES LIKE "secure_file_priv";
149+
+------------------+-------+
150+
| Variable_name | Value |
151+
+------------------+-------+
152+
| secure_file_priv | |
153+
+------------------+-------+
154+
1 row in set (0.01 sec)
155+
121156
</pre>
122157
</div>
123158
</div><div xmlns="" id="SOHUCS"></div><script xmlns="" charset="utf-8" type="text/javascript" src="https://cy-cdn.kuaizhan.com/upload/changyan.js"></script><script xmlns="" type="text/javascript">

architect/cloud/bastionhost.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<a xmlns="" href="//netkiller.github.io/">简体中文</a> |
44
<a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> |
55
<a xmlns="" href="/journal/index.html">杂文</a> |
6+
<a xmlns="" href="https://github.com/netkiller">Github</a> |
67
<a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> |
78
<a xmlns="" href="https://edu.51cto.com/lecturer/1703915.html">51CTO学院</a> |
89
<a xmlns="" href="https://edu.csdn.net/lecturer/6423">CSDN程序员研修院</a> |
9-
<a xmlns="" href="https://github.com/netkiller">Github</a> |
1010
<a xmlns="" href="http://my.oschina.net/neochen/">OSChina 博客</a> |
1111
<a xmlns="" href="https://cloud.tencent.com/developer/column/2078">腾讯云社区</a> |
1212
<a xmlns="" href="https://yq.aliyun.com/u/netkiller/">阿里云栖社区</a> |
@@ -16,14 +16,14 @@
1616
<a xmlns="" href="//www.netkiller.cn/home/donations.html">打赏(Donations)</a> |
1717
<a xmlns="" href="//www.netkiller.cn/home/about.html">About</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.5. 堡垒机</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="瓶颈分析.html">上一页</a> </td><th width="60%" align="center">第 3 章 阿里云</th><td width="20%" align="right"> <a accesskey="n" href="../database/index.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=watch&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=fork&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;type=follow&amp;count=true&amp;size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td><td></td><td><a href="https://zhuanlan.zhihu.com/netkiller"><img src="/images/logo/zhihu-card-default.svg" height="25" /></a></td><td valign="middle"><a href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a><a href="https://www.zhihu.com/club/1241768772601950208">多维度架构</a></td><td></td><td></td><td></td><td></td></tr></table><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="bastionhost"></a>3.5. 堡垒机</h2></div></div></div>
1818

19-
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm67339404464"></a>3.5.1. 数据库查询需求解决方案</h3></div></div></div>
19+
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm317397382048"></a>3.5.1. 数据库查询需求解决方案</h3></div></div></div>
2020

21-
<div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="idm67339403744"></a>3.5.1.1. 背景和需求</h4></div></div></div>
21+
<div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="idm317397380400"></a>3.5.1.1. 背景和需求</h4></div></div></div>
2222

2323
<p>部分小组有数据库查询,频次较高,Yearning 平台无法满足需求。目前方式是阿里云RDS挂载公网IP,暴漏3306查询</p>
2424
<p>需求:实现谁,什么时间,做了什么操作。</p>
2525
</div>
26-
<div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="idm67339401776"></a>3.5.1.2. 方案选型</h4></div></div></div>
26+
<div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="idm317397378432"></a>3.5.1.2. 方案选型</h4></div></div></div>
2727

2828
<p>方案一、无影云桌面</p>
2929
<p>方案二、堡垒机+远程桌面+视频录屏+操作留痕</p>
@@ -32,7 +32,7 @@
3232
</div>
3333
</div>
3434

35-
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm67349602448"></a>3.5.2. 解决方案</h3></div></div></div>
35+
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm317397375472"></a>3.5.2. 解决方案</h3></div></div></div>
3636

3737
<div class="screenshot">
3838

@@ -42,7 +42,7 @@
4242
<div class="orderedlist"><p class="title"><strong>优点:</strong></p><ol class="orderedlist" type="1"><li class="listitem">堡垒机可以录屏,可以看到整个操作期间的过程,便于事故复盘和追责</li><li class="listitem">经过堡垒机后 RDS 再无挂载公网IP的需求,直接内网链接 RDS 从库,这种方案更安全,RDS彻底摆脱暴力3306端口的风险</li><li class="listitem">三层登录保障,第一层堡垒机,第二层云桌面,如果在家中访问云桌面,还需要登录到公司VPN</li></ol></div>
4343
<div class="orderedlist"><p class="title"><strong>缺点:</strong></p><ol class="orderedlist" type="1"><li class="listitem">产生费用</li><li class="listitem">远程操作稍复杂</li><li class="listitem">下载数据需要中转</li></ol></div>
4444
</div>
45-
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm67340369280"></a>3.5.3. 方案实施</h3></div></div></div>
45+
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm317397368096"></a>3.5.3. 方案实施</h3></div></div></div>
4646

4747
<div class="orderedlist"><p class="title"><strong>实施方案步骤:</strong></p><ol class="orderedlist" type="1"><li class="listitem">卸载阿里云RDS数据库公网IP(需要评估影响范围)</li><li class="listitem">准备一个云桌面Windows</li><li class="listitem">设置内网访问策略,允许云桌面从内网链接到指定从库</li><li class="listitem">堡垒机开通链接云桌面权限</li><li class="listitem">云桌面开通登录账号</li><li class="listitem">本地首先登录堡垒机,需要手机号+验证码。然后通过堡垒机链接远程桌面,再登录云桌面的账号。在远程电脑上,大家可以根据自己喜好安装工具,最后从内网访问 RDS 从库查询数据。操作过程会录屏。</li></ol></div>
4848
</div>

0 commit comments

Comments
 (0)