Welcome to the Linux community forum, interact with 2 million technical staff to enter the Database connection method [root @ gd02-qa-plxt2-nodomain] # mysql-uvipdns-pvipdns-h10.0.3.99mysqlshowdatabases; + -------------------- + | Database | + -------------------- + | information_sche
Welcome to the Linux community forum, interact with 2 million technical staff> enter the database connection method [root @ gd02-qa-plxt2-nodomain/] # mysql-u vipdns-pvipdns-h 10.0.3.99 mysql show databases; + -------------------- + | Database | + -------------------- + | information_sche
Welcome to the Linux community forum and interact with 2 million technicians>
Database Connection Method
[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)
Note:
-U specified user name (vipdns)
-P password (vipdns)
-H specifies the host (10.0.3.99)
Default port 3306
Table Information
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)
Important: domain table records table
Domain table structure
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)
Data in the current domains table
Mysql> select * from domains;
+ ---- + --------------------- + -------- + ------------ + -------- + ----------------- + --------- +
| Id | name | master | last_check | type | notified_serial | account |
+ ---- + --------------------- + -------- + ------------ + -------- + ----------------- + --------- +
| 1 | vclound.com | NULL | MASTER | NULL |
| 2 | 3.0.10.in-addr. arpa | NULL | MASTER | NULL |
+ ---- + --------------------- + -------- + ------------ + -------- + ----------------- + --------- +
2 rows in set (0.00 sec)
Note:
Id-primary key
Name-domain name (two already added), First follow vclound.com
Master-Unknown
Last_check-Unknown
Type-whether the Primary Domain Server (usually only one DNS is MASTER)
Notified_serial-Modify version information
Account-Unknown
Add a 163.com domain name and call an SQL example
Insert into pdns. domains (name, type) values ('2017. com', 'master ');
[1] [2] [3]