欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 数据库连接方法 [root@gd02-qa-plxt2-nodomain /]# mysql -u vipdns -pvipdns -h 10.0.3.99 mysql show databases; +--------------------+ | Database | +--------------------+ | information_sche
欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入
数据库连接方法
[root@gd02-qa-plxt2-nodomain /]# mysql -u vipdns -pvipdns -h 10.0.3.99
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| pdns |
+--------------------+
2 rows in set (0.00 sec)
注:
-u 指定用户名 (vipdns)
-p 指定密码 (vipdns)
-h 指定主机 (10.0.3.99)
默认端口 3306
表信息
mysql> show tables;
+--------------------+
| Tables_in_pdns |
+--------------------+
| cryptokeys |
| domainmetadata |
| domains |
| perm_items |
| perm_templ |
| perm_templ_items |
| records |
| supermasters |
| tsigkeys |
| users |
| zone_templ |
| zone_templ_records |
| zones |
+--------------------+
13 rows in set (0.00 sec)
重点关注: domain 表 records 表
domain 表结构
mysql> desc domains;
+-----------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(255) | NO | UNI | NULL | |
| master | varchar(128) | YES | | NULL | |
| last_check | int(11) | YES | | NULL | |
| type | varchar(6) | NO | | NULL | |
| notified_serial | int(11) | YES | | NULL | |
| account | varchar(40) | YES | | NULL | |
+-----------------+--------------+------+-----+---------+----------------+
7 rows in set (0.01 sec)
当前 domains 表中数据
mysql> select * from domains;
+----+---------------------+--------+------------+--------+-----------------+---------+
| id | name | master | last_check | type | notified_serial | account |
+----+---------------------+--------+------------+--------+-----------------+---------+
| 1 | vclound.com | NULL | NULL | MASTER | NULL | NULL |
| 2 | 3.0.10.in-addr.arpa | NULL | NULL | MASTER | NULL | NULL |
+----+---------------------+--------+------------+--------+-----------------+---------+
2 rows in set (0.00 sec)
说明:
id - 主键
name - 域名(当前已添加两个), 先关注 vclound.com
master - 未知
last_check - 未知
type - 是否主域服务器 (通常只有一个 DNS 情况都是 MASTER)
notified_serial - 修改版本信息
account - 未知
添加 163.com 域名 , 调用 sql 例
insert into pdns.domains (name, type) values ( '163.com', 'MASTER');
[1] [2] [3]