Difference between revisions of "PowerDNS (with SolusVM ) mysql"
Line 28: | Line 28: | ||
_____ | _____ | ||
− | how to set PTR within mysql: | + | how to set PTR within mysql example: |
INSERT INTO records VALUES (839,78,'53.64.239.91.in-addr.arpa','PTR','welcomestuck.com',300,0,0); | INSERT INTO records VALUES (839,78,'53.64.239.91.in-addr.arpa','PTR','welcomestuck.com',300,0,0); | ||
+ | |||
+ | You need to view domain id: | ||
+ | |||
+ | select * from domains where name='vpsget.com'; | ||
+ | select * from records where type='PTR'; | ||
+ | select * from records where domain_id=5; |
Revision as of 14:08, 10 September 2015
Some examples for solusvm mysql db
Solusvm DB name looks like some ID.
mysql
show databases; use <solusvmDBname_likeID> ; show tables;
show all servers with IP like specified:
select vserverid, mainipaddress, hostname from vservers where mainipaddress like '185.31%';
show all servers with ip like specified and not disabled:
select vserverid, mainipaddress, hostname, cachestatus, disabled from vservers where mainipaddress like '%185.31%' and disabled='0';
change some record example:
UPDATE vservers SET mainipaddress = '10.10.10.143' WHERE ctid=5342;
select all servers with ip like specified and join with clients table:
SELECT clients.emailaddress, clients.clientid, vservers.clientid, vservers.vserverid, vservers.mainipaddress, vservers.hostname, vservers.disabled FROM vservers JOIN clients ON clients.clientid=vservers.clientid WHERE vservers.mainipaddress like '%185.31%' and disabled='0' ;
_____
how to set PTR within mysql example:
INSERT INTO records VALUES (839,78,'53.64.239.91.in-addr.arpa','PTR','welcomestuck.com',300,0,0);
You need to view domain id:
select * from domains where name='vpsget.com'; select * from records where type='PTR'; select * from records where domain_id=5;