Difference between revisions of "PowerDNS (with SolusVM ) mysql"
m (Ndi moved page SolusVM mysql to PowerDNS (with SolusVM ) mysql) |
|||
Line 25: | Line 25: | ||
JOIN clients ON clients.clientid=vservers.clientid | JOIN clients ON clients.clientid=vservers.clientid | ||
WHERE vservers.mainipaddress like '%185.31%' and disabled='0' ; | WHERE vservers.mainipaddress like '%185.31%' and disabled='0' ; | ||
+ | |||
+ | |||
+ | _____ | ||
+ | how to set PTR within mysql: | ||
+ | |||
+ | INSERT INTO records VALUES (839,78,'53.64.239.91.in-addr.arpa','PTR','welcomestuck.com',300,0,0); |
Revision as of 14:02, 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:
INSERT INTO records VALUES (839,78,'53.64.239.91.in-addr.arpa','PTR','welcomestuck.com',300,0,0);