To run PowerDNS Authoritative Server with MariaDB, install the server and its Generic MySQL/MariaDB backend, create the release-matched PowerDNS schema with InnoDB tables, configure launch=gmysql and the gmysql-* connection settings, then create and query an authoritative zone. Use pdnsutil or the PowerDNS REST API for zone and record changes rather than editing records directly in SQL.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
The procedure below uses Debian-style commands for a concrete example and notes where Red Hat, FreeBSD, and macOS package details differ.
As an Amazon Associate I earn from qualifying purchases.
What the MariaDB backend does
PowerDNS Authoritative Server answers DNS queries from an authoritative data source. With the Generic MySQL/MariaDB backend, that source is a MariaDB database. The backend module and its PowerDNS launch name are both gmysql; “MySQL” in the package and option names refers to the compatible MySQL/MariaDB client interface.
PowerDNS reads zone metadata and records from tables such as domains and records. The same backend supports authoritative primary and secondary operation, DNS UPDATE, autosecondary provisioning, and DNSSEC when the corresponding schema and server settings are present. MariaDB is not a caching resolver in this design: PowerDNS serves the zones you create, while recursive lookups are outside the authoritative server’s role.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Before you install
Required components
- A supported Linux, FreeBSD, or macOS system with administrative access.
- PowerDNS Authoritative Server and the distribution package that provides the
gmysqlbackend. - A running MariaDB server, either on the same machine or reachable over the network.
- A hostname and IP address for the authoritative nameserver. Public service normally requires both UDP and TCP access to port 53.
- A schema that matches the installed PowerDNS release. Do not mix an older SQL schema with a newer server package.
Keep a separate administrative MariaDB account for installation and a restricted account for PowerDNS. Generate a long, unique password for the latter and store it in a root-readable configuration file.
Install PowerDNS and the gmysql package
Debian and Ubuntu
PowerDNS documentation states that the Authoritative Server is available through the apt system. Install the server, the MariaDB/MySQL backend, and MariaDB itself if it is not already present:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
sudo apt update
sudo apt install pdns-server pdns-backend-gmysql mariadb-server
On an existing MariaDB host, omit mariadb-server. If the package installer asks which backend to configure, leave the final backend configuration for the explicit file-based setup below so that only gmysql is enabled.
Red Hat-based distributions
Enable the PowerDNS repository appropriate for your distribution, then install the pdns package and its matching MySQL/MariaDB backend package. Package names vary by repository and release, so confirm that the installed backend provides the gmysql module before continuing. Install and start MariaDB separately when it is local:
sudo dnf install pdns <the-repository's-gmysql-backend-package> mariadb-server
sudo systemctl enable --now mariadb
Do not assume that a package named exactly like the Debian package exists on every Red Hat-based system; the repository’s package metadata is authoritative.
FreeBSD and macOS
The official installation guidance also covers FreeBSD packages and Homebrew on macOS. Use the package name and service mechanism supplied for that platform, then apply the same database, schema, and gmysql configuration steps. Paths such as /etc/powerdns/pdns.conf and the service unit name may differ.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Create the MariaDB database and account
Start MariaDB and open an administrative session
sudo systemctl enable --now mariadb
sudo mariadb
Create a database and least-privilege service accounts
The account host must match the connection method you select later. The following example prepares both a local-socket login and a TCP login on loopback; use only the one you need if you want a narrower account set.
CREATE DATABASE powerdns
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
CREATE USER 'powerdns'@'localhost'
IDENTIFIED BY 'use-a-unique-random-secret';
CREATE USER 'powerdns'@'127.0.0.1'
IDENTIFIED BY 'use-a-unique-random-secret';
GRANT ALL PRIVILEGES ON powerdns.* TO 'powerdns'@'localhost';
GRANT ALL PRIVILEGES ON powerdns.* TO 'powerdns'@'127.0.0.1';
FLUSH PRIVILEGES;
EXIT;
For a remote MariaDB server, create an account whose host pattern is the PowerDNS server’s fixed address, grant it only on powerdns.*, and restrict MariaDB’s network access with its firewall. Avoid a broad wildcard account unless you have a specific, controlled reason to use one.
Load the official PowerDNS schema
Use the schema for your exact release
Obtain the default gmysql schema from the PowerDNS documentation or the matching distribution package. The schema includes tables such as domains, records, and the metadata and key tables used by features such as DNSSEC. Import it into the empty powerdns database with an administrative MariaDB login:
mariadb -u root -p powerdns < schema.sql
Run that command from the directory containing the schema file, or provide its actual filesystem path. The filename supplied by a package may differ; the important requirement is that the SQL comes from the same PowerDNS release family as the server.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsWhy InnoDB matters
The current documented schema defines its tables with InnoDB. Keep that engine unless you have a tested, documented reason to change it. Transaction-aware behavior is important for multi-step operations; the PowerDNS documentation warns that non-transaction-aware engines can fail during work such as incoming zone transfers.
Verify the import
mariadb -u root -p -e "USE powerdns; SHOW TABLES;"
mariadb -u root -p -e "SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA='powerdns';"
You should see the expected PowerDNS tables and InnoDB as their storage engine. If tables are missing, stop here and import the correct schema rather than trying to create individual tables from memory.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Configure PowerDNS to use MariaDB
Create a protected configuration fragment
PowerDNS reads configuration fragments ending in .conf from the distribution’s pdns.d directory. A typical Debian or Ubuntu location is /etc/powerdns/pdns.d/. Create a file such as gmysql.conf there and restrict it because it contains the database password:
sudo install -o root -g root -m 0640 /dev/null /etc/powerdns/pdns.d/gmysql.conf
sudo editor /etc/powerdns/pdns.d/gmysql.conf
Put the following settings in the file, changing only the values that describe your installation:
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchlaunch=gmysql
gmysql-host=127.0.0.1
gmysql-port=3306
gmysql-dbname=powerdns
gmysql-user=powerdns
gmysql-password=use-a-unique-random-secret
gmysql-dnssec=no
launch=gmysql is the directive that tells the authoritative server which backend to start. Remove or disable conflicting launch= lines in other configuration files; fragments are loaded in order, so an earlier or later setting can otherwise select an unintended backend.
Select TCP or a Unix socket, not both
For a local MariaDB, choose one connection method:
- TCP: keep
gmysql-host=127.0.0.1and normally use port3306. This avoids ambiguity when the client discovers the wrong socket. - Unix socket: remove
gmysql-hostand setgmysql-socketto MariaDB’s actual socket path, for example/run/mysqld/mysqld.sockwhen that is the path on your system.
gmysql-host and gmysql-socket are mutually exclusive connection methods. If both are present, remove one rather than hoping the client will choose correctly. The documented defaults are port 3306, database powerdns, user powerdns, and DNSSEC disabled; setting them explicitly makes the deployment easier to audit.
DNSSEC and client TLS settings
Set gmysql-dnssec=yes only after the release-matched schema is installed and you intend to manage DNSSEC keys through PowerDNS. For newer releases, MariaDB TLS options belong in the MariaDB client configuration rather than being invented as arbitrary PowerDNS directives. Follow the client configuration format supplied by your MariaDB version.
Check the effective configuration
Review every file under the configuration directory for duplicate launch directives, old credentials, or a stale socket path. A correct fragment is not enough if another file overrides it. Keep the file readable by the PowerDNS service account and inaccessible to unprivileged users.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Start the service and inspect its first result
sudo systemctl restart pdns
sudo systemctl status pdns --no-pager
sudo journalctl -u pdns -e
A successful start means PowerDNS loaded the gmysql backend and was able to open its listening sockets. It does not prove that a zone exists yet. If the service fails, use the first database or bind error in the journal; later messages are often consequences.
Run an isolated foreground test
When the normal configuration is confusing, run a temporary foreground instance on an unused port. This avoids the production port and ignores normal configuration files:
sudo pdns_server --no-config --daemon=no --local-port=5300 --launch=gmysql
--gmysql-host=127.0.0.1 --gmysql-port=3306
--gmysql-dbname=powerdns --gmysql-user=powerdns
--gmysql-password=use-a-unique-random-secret
Watch the terminal for authentication, schema, or connection errors, then stop the test with Ctrl+C. Do not leave a second instance running against the production database.
Create an initial authoritative zone
Use pdnsutil rather than direct SQL
pdnsutil writes the schema in the way expected by the PowerDNS release. Create a zone and its nameserver records after the service is running:
Recommended Free Tools
sudo pdnsutil create-zone example.com ns1.example.com
sudo pdnsutil add-record example.com ns1 A 192.0.2.53
sudo pdnsutil add-record example.com www A 192.0.2.10
sudo pdnsutil check-zone example.com
sudo pdnsutil list-zone example.com
The addresses in this example use documentation ranges. Replace them with addresses routed to your own nameserver and web service. Keep the zone name and record names consistent with the trailing-dot rules displayed by your installed pdnsutil version.
Delegate the zone outside PowerDNS
For an Internet-visible zone, the parent zone must delegate to your nameserver. Register the nameserver, provide glue when the nameserver is inside the delegated domain, and permit inbound UDP and TCP on port 53. A locally answering zone is not publicly reachable until the parent delegation and network firewall agree with it.
Best Value
Query the server and confirm authoritative answers
dig @127.0.0.1 example.com SOA +norecurse
dig @127.0.0.1 example.com NS +norecurse
dig @127.0.0.1 www.example.com A +norecurse
The replies should contain the SOA, NS, and A data created above. Test the server’s real service address as well as loopback, and test both IPv4 and IPv6 listeners if you configured them. The aa flag in a dig response indicates that the answer is authoritative.
If local queries work but remote queries time out, check the host firewall, any cloud security group, and both UDP and TCP port 53. If remote queries reach the server but return the wrong zone, check parent delegation and whether another nameserver is authoritative for the domain.
Manage records safely after installation
Routine changes
Use pdnsutil for scripted or administrative changes, for example:
sudo pdnsutil add-record example.com api A 192.0.2.20
sudo pdnsutil delete-rrset example.com api A
sudo pdnsutil list-zone example.com
Exact subcommands can vary by PowerDNS release, so check the installed pdnsutil --help output before automating destructive operations. The generic SQL guidance recommends pdnsutil or the REST API instead of direct SQL record manipulation; direct edits can bypass validation, serial handling, DNSSEC metadata, and cache invalidation behavior.
REST API option
The REST API is useful for controlled automation and provisioning systems. Enable it only with an authentication key, bind the web interface to a management network, and protect it with network controls and TLS termination appropriate to your environment. Do not expose an unauthenticated management endpoint to the public Internet.
Enable advanced backend capabilities deliberately
DNSSEC
The gmysql backend supports DNSSEC. Set gmysql-dnssec=yes, use the matching schema’s key tables, and then follow the DNSSEC workflow for your installed PowerDNS release. Publish the resulting DS information at the parent zone only after validating the signed zone and its key roll-over plan.
DNS UPDATE and secondary service
The backend also supports primary and secondary roles, DNS UPDATE, and autosecondary operation. These features require explicit policy: restrict update clients, define which secondaries may transfer zones, and monitor transfer and serial changes. Enabling the backend capability alone does not safely authorize arbitrary update or transfer requests.
Quick Recap
Troubleshoot the failures seen most often
| Symptom | Likely cause | Checks and fix |
|---|---|---|
| “Access denied” or authentication failure | The MariaDB account host, password, or privileges do not match the configured connection. | Test the same host, user, and database with the MariaDB client. If PowerDNS uses 127.0.0.1, ensure an account exists for that host; if it uses a socket, ensure the localhost account and socket permissions are correct. |
| Can’t connect to the MariaDB socket | gmysql-socket points to a path that does not exist, or the server is using TCP instead. |
Find the socket path reported by MariaDB, set that exact path, and remove gmysql-host; alternatively remove the socket setting and force TCP with gmysql-host=127.0.0.1. |
| Unknown table, column, or SQL syntax error | The schema does not match the PowerDNS release or was only partially imported. | Back up any needed data, recreate or repair the database with the official schema for the installed release, and verify all expected tables use InnoDB. |
| PowerDNS starts but serves no zones | No zone has been created in the selected database, or a different backend is being launched. | Run pdnsutil list-all-zones, inspect every configuration fragment for conflicting launch settings, and confirm that the service account can read the intended credentials. |
| “Address already in use” on startup | Another nameserver or another PowerDNS instance already occupies UDP or TCP port 53. | Identify the process listening on port 53, stop or reconfigure the conflicting service, or run a foreground diagnostic instance on port 5300. |
| Queries work on the host but fail elsewhere | Firewall rules, cloud security groups, NAT, or parent delegation are incomplete. | Allow both UDP and TCP 53, test the server’s reachable address, and verify the parent’s NS and glue records. |
Operational checklist
- Pin the PowerDNS package and schema to a compatible release during upgrades.
- Back up the MariaDB database before schema changes, DNSSEC key operations, or major migrations.
- Keep the database password in a protected configuration fragment and rotate it by updating MariaDB and PowerDNS together.
- Monitor the
pdnsjournal, MariaDB health, query latency, and failed transfers or updates. - Test restores and secondary failover instead of assuming that a successful service start proves recoverability.
- Use
pdnsutilor the REST API for changes, and reserve direct SQL access for supported administrative or migration tasks.
Minimal end-to-end sequence
- Install
pdns-serverandpdns-backend-gmysql(or the platform’s equivalent), and ensure MariaDB is running. - Create the
powerdnsdatabase and a restricted service account whose host matches TCP or socket use. - Import the official, release-matched gmysql schema and verify InnoDB tables.
- Create a protected fragment with
launch=gmysqland exactly one ofgmysql-hostorgmysql-socket. - Restart PowerDNS, inspect its status and journal, and resolve any database or port-53 error.
- Create a test zone with
pdnsutil, query it withdig, and only then configure parent delegation and production records.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

