How to Install and Configure ‘PowerDNS’ (with MariaDB) and ‘PowerAdmin’ in RHEL/CentOS 7

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Marin Todorov

I am a bachelor in computer science and a Linux Foundation Certified System Administrator. Currently working as a Senior Technical support in the hosting industry. In my free time I like testing new software and inline skating.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

15 Responses

  1. Miguel Moreira says:

    I have error when I connect MySQL with pdns with this databases, for fixed I create the format of databases from the official website of powerdns.

    CREATE TABLE domains (
      id                    INT AUTO_INCREMENT,
      name                  VARCHAR(255) NOT NULL,
      master                VARCHAR(128) DEFAULT NULL,
      last_check            INT DEFAULT NULL,
      type                  VARCHAR(6) NOT NULL,
      notified_serial       INT DEFAULT NULL,
      account               VARCHAR(40) DEFAULT NULL,
      PRIMARY KEY (id)
    ) Engine=InnoDB;
    CREATE UNIQUE INDEX name_index ON domains(name);
    CREATE TABLE records (
      id                    BIGINT AUTO_INCREMENT,
      domain_id             INT DEFAULT NULL,
      name                  VARCHAR(255) DEFAULT NULL,
      type                  VARCHAR(10) DEFAULT NULL,
      content               VARCHAR(64000) DEFAULT NULL,
      ttl                   INT DEFAULT NULL,
      prio                  INT DEFAULT NULL,
      change_date           INT DEFAULT NULL,
      disabled              TINYINT(1) DEFAULT 0,
      ordername             VARCHAR(255) BINARY DEFAULT NULL,
      auth                  TINYINT(1) DEFAULT 1,
      PRIMARY KEY (id)
    ) Engine=InnoDB;
    CREATE INDEX nametype_index ON records(name,type);
    CREATE INDEX domain_id ON records(domain_id);
    CREATE INDEX recordorder ON records (domain_id, ordername);
    CREATE TABLE supermasters (
      ip                    VARCHAR(64) NOT NULL,
      nameserver            VARCHAR(255) NOT NULL,
      account               VARCHAR(40) NOT NULL,
      PRIMARY KEY (ip, nameserver)
    ) Engine=InnoDB;
    CREATE TABLE comments (
      id                    INT AUTO_INCREMENT,
      domain_id             INT NOT NULL,
      name                  VARCHAR(255) NOT NULL,
      type                  VARCHAR(10) NOT NULL,
      modified_at           INT NOT NULL,
      account               VARCHAR(40) NOT NULL,
      comment               VARCHAR(64000) NOT NULL,
      PRIMARY KEY (id)
    ) Engine=InnoDB;
    CREATE INDEX comments_domain_id_idx ON comments (domain_id);
    CREATE INDEX comments_name_type_idx ON comments (name, type);
    CREATE INDEX comments_order_idx ON comments (domain_id, modified_at);
    CREATE TABLE domainmetadata (
      id                    INT AUTO_INCREMENT,
      domain_id             INT NOT NULL,
      kind                  VARCHAR(32),
      content               TEXT,
      PRIMARY KEY (id)
    ) Engine=InnoDB;
    CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind);
    CREATE TABLE cryptokeys (
      id                    INT AUTO_INCREMENT,
      domain_id             INT NOT NULL,
      flags                 INT NOT NULL,
      active                BOOL,
      content               TEXT,
      PRIMARY KEY(id)
    ) Engine=InnoDB;
    CREATE INDEX domainidindex ON cryptokeys(domain_id);
    CREATE TABLE tsigkeys (
      id                    INT AUTO_INCREMENT,
      name                  VARCHAR(255),
      algorithm             VARCHAR(50),
      secret                VARCHAR(255),
      PRIMARY KEY (id)
    ) Engine=InnoDB;
    CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm);
  2. Nafees Ahmed says:

    how zone data will replicate on ns1 and ns2 ?

  3. Jay says:

    I appreciate to this person but “Username – username for the PowerAdmin.” you have a typo :(

  4. sirmonkey says:

    Looks like there was a pdns schema change and some of the tables have changed. powerdns not longer works for me
    i tried updating the schema to :

  5. sharma says:

    Hi Ravi,

    I installed powerdns and login in to the poweradmin,but my dns is not resolving.

    [[email protected] ~]# nslookup server2
    ;; Got SERVFAIL reply from, trying next server
    ;; Got SERVFAIL reply from, trying next server
    ;; Got SERVFAIL reply from, trying next server

    ** server can’t find server2: NXDOMAIN

  6. sanjay says:

    can you plese assist how to upgrade the version from 3.3 to 4.x.

    • Ravi Saive says:


      Have you tried PowerDNS using default EPEL repository using Yum package manager? if not, try it or compile it from source to get latest version of PowerDNS.

  7. oscar says:

    I installed powerdns, follow the link .
    When I do dig command into self LAN of the pdns I always receive:

    ;; WARNING: recursion requested but not available

    anything is default setting… where is the log file?

    how can I understand how resolve?




    from my machine to pdns:

    nmap -v -sT
    22/tcp open ssh
    53/tcp open domain
    80/tcp open http
    3306/tcp open mysql

    nmap -v -sU
    53/udp open|filtered domain

    ; <> DiG 9.8.3-P1 <> @
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 58633
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    ;; WARNING: recursion requested but not available

    ; IN A

    ;; Query time: 1 msec
    ;; SERVER:
    ;; WHEN: Fri Jul 22 18:15:12 2016
    ;; MSG SIZE rcvd: 31

    no firewall, selinux disabled

    thanks a lot

  8. Vivan says:

    I get “Authentication failed! ” error in GUI , Once i launched the GUI, When i try logging in to the GUI with my admin user and password. Can you help.

  9. Janis says:

    Actually correct way to create tables would be to use: /usr/share/doc/pdns-backend-mysql-3.X.X folder which consists from database schema files. In case you want to deploy powerdns with DNSSEC, schema will be there.
    mysql -uroot -p powerdns < /usr/share/doc/pdns-backend-mysql-3.X.X/schema.mysql.sql

  10. sirmonkey says:

    Please update your directions:
    GRANT ALL ON powerdns.* TO ‘powerdns’@’localhost’ IDENTIFIED BY ‘passWord1’;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘‘passWord1’’ at line 1

Leave a Reply to Miguel Moreira Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.