
我的阿里云 rds 公网 host 为 xxxxo.mysql.rds.aliyuncs.com 我用 dig, nslookup 命令解析不到对应的 ip 。 dig 输出的信息如下:
; <<>> DiG 9.18.1-1ubuntu1.1-Ubuntu <<>> xxxxo.mysql.rds.aliyuncs.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 26374 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;xxxxo.mysql.rds.aliyuncs.com. IN A ;; AUTHORITY SECTION: rds.aliyuncs.com. 460 IN SOA hidden-master.aliyun.com. hostmaster.aliyun-inc.com. 2072074962 7200 900 2592000 600 ;; Query time: 39 msec ;; SERVER: 172.18.208.1#53(172.18.208.1) (UDP) ;; WHEN: Thu Apr 27 10:34:30 CST 2023 ;; MSG SIZE rcvd: 138 1 goodryb 2023-04-27 10:56:03 +08:00 我记得默认好像是不开通公网域名的, 如果真要在公网使用,要先去控制台开启公网访问 另外,数据库强烈不建议放到公网访问,有安全风险。 |
2 niceTeen84 OP @goodryb 我就是开通了公网访问域名,就是好奇如何解析到这个公网域名对应的 IP 。 |
3 julyclyde 2023-04-27 12:47:32 +08:00 |
4 yinmin 2023-04-27 14:04:16 +08:00 第一步: 在公司 /家的电脑上 ping xxxxo.mysql.rds.aliyuncs.com 确认有 IP 地址返回 (不要在服务器上操作) 第二步:dig +trace @1.1.1.1 xxxxo.mysql.rds.aliyuncs.com 查看详细 dns 解析 |
5 mohumohu 2023-04-27 19:24:27 +08:00 去 dns.google.com 查询,有就有,没有就没有 |