[Pdns-users] Trying to find a simple "how to" - pdnsutil secure-zone version

Mike mike+lists at yourtownonline.com
Tue Apr 9 14:47:12 UTC 2019


On 4/9/19 6:24 AM, Brian Candler wrote:
> On 09/04/2019 13:59, Edward Lewis wrote:
>> I tried this command:
>> zone2sql --named-conf=/path/to/named.conf --gmysql | mysql -u pdns -p
>> pdns-db
>>
>> adjusting the "/path/to" first.  The pre--pipe command spit out what
>> I'd expect.  The latter command complained about the -u (fixed that)
>> and then the -p, but I don't know how to fix that.
>
> I use mysql rather than mariadb, but they should be similar.  In
> mysql, the command breaks down as:
>
> "-u pdns": the username to connect to the database as
>
> "-p": prompt for password (or you can follow it immediately with a
> password, with no intervening space)
>
> "pdns-db": the name of the database you want to connect to
>
> So you need to know the creds the database was created with.  On
> Ubuntu, when you install mysql, you get a dialog asking to select a
> root database password.  Then you can connect with that (-u root -p),
> create a new database, create appropriate tables for powerdns, create
> another user/pass for powerdns, and grant access to pdns-db.* to that
> user.
>
> The table creation info is here:
>
> https://doc.powerdns.com/authoritative/guides/basic-database.html
>
> As it says: "General MySQL knowledge is assumed".  But searching for
> "mysql create database" and "mysql grant privileges" should help. 


If I can add, the sqlite3 support would likely be even easier since most
of the mysql dba stuff you need to do to 'get in the door' is eliminated
(users and so forth).


$0.02




More information about the Pdns-users mailing list