[Pdns-users] gmysql-basic-query

Dan Nica timi at crystal.rdstm.ro
Fri Jun 30 08:24:50 UTC 2006


hi 

do I have to restart the server after modifing the database ?
becouse after seting the status on 'D' nothing happens, but if i
restart the server in monitor mod I get this:

Jun 30 11:16:47 Error receiving packet from recursor backend: Connection refused
Jun 30 11:16:52 Error receiving packet from recursor backend: Connection refused
Jun 30 11:17:06 Error receiving packet from recursor backend: Connection refused
Jun 30 11:17:11 Error receiving packet from recursor backend: Connection refused

but without restarting I can still query the domain that dont have an A 
status...

On Thu, 29 Jun 2006, Richard Mayhew - Nashua Broadband wrote:

> Hi
> 
> This is what I added to my config file to do what you were after. I
> might have gone over board but they seem to work for me.
> 
> #MySQL Custom Queries
> gmysql-master-zone-query=select master from domains where name='%s' and
> type='SLAVE' and status='A'
> gmysql-info-all-master-query=select
> id,name,master,last_check,notified_serial,type from domains where
> type='MASTER' and status='A'
> gmysql-info-zone-query=select
> id,name,master,last_check,notified_serial,type from domains where
> name='%s' and status='A'
> gmysql-basic-query=select content,ttl,prio,type,domain_id,name from
> records where type='%s' and name='%s' and status='A'
> gmysql-id-query=select content,ttl,prio,type,domain_id,name from records
> where type='%s' and name='%s' and domain_id=%d and status='A'
> gmysql-any-query=select content,ttl,prio,type,domain_id,name from
> records where name='%s' and status='A'
> gmysql-any-id-query=select content,ttl,prio,type,domain_id,name from
> records where name='%s' and domain_id=%d and status='A'
> gmysql-list-query=select content,ttl,prio,type,domain_id,name from
> records where domain_id=%d and status='A'
> 
> The STATUS field in the database is a single CHAR which I use 'A' for
> Active, 'S' for Suspended and 'D' for Deleted. We will set the domain as
> deleted for 24hrs and then remove it just incase there is a problem and
> we need to re-instate it.
> 
> Hope this helps...
> 
>  
> 
> -----Original Message-----
> From: pdns-users-bounces at mailman.powerdns.com
> [mailto:pdns-users-bounces at mailman.powerdns.com] On Behalf Of Dan Nica
> Sent: 29 June 2006 12:16 PM
> To: pdns-users at mailman.powerdns.com
> Subject: [Pdns-users] gmysql-basic-query
> 
> hi
> 
> I want to disable a domain from sql, so I added a "status" row to the
> domain tables and modified the gmysql-basic-query in pdns.conf like
> this:
> gmysql-basic-query=select
> r.content,r.ttl,r.prio,r.type,r.domain_id,r.name from records r left
> join domains d on (r.domain_id = d.id) where d.status='0' and
> r.type='%s' and r.name='%s'
> but it looks like it wont work :(
> 
> what am I doing wrong ?
> 
> 10x
> --
> Dan
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users
> 


More information about the Pdns-users mailing list