Child pages
  • How to Use MyDNS-NG
Skip to end of metadata
Go to start of metadata


MyDNS-NG (which we refer to as MyDNS) is DNS server software for Linux servers. It uses a database to store the server's DNS zone files. Because of this, MyDNS is an efficient nameserver for servers or DNS clusters that store large numbers (hundreds of thousands) of zone records.

MyDNS requires the following minimum configuration to run on your cPanel & WHM server:

  • cPanel & WHM version 11.32 or later.
  • MySQL® version 5.0 or later.
  • BIND


  • MyDNS does not remove BIND from the system. BIND is a base requirement for cPanel & WHM servers.
  • MyDNS does not support Domain Name System Security Extensions (DNSSEC) or PostgreSQL®.

Install MyDNS


Currently, you cannot install MyDNS during the cPanel & WHM installation process. 

From the WHM interface

To install MyDNS through the WHM interface, perform the following steps: 

  1. Navigate to WHM's Nameserver Selection  interface (Home >> Service Configuration >> Nameserver Selection).
  2. Select MyDNS.
  3. Click Save.

From the command line

To install MyDNS through the command line, run the following command as the root user:

/scripts/setupnameserver mydns 

Return to MyDNS from another DNS server


If you change to a different DNS server and then change back to MyDNS, you must run a forced DNS import and restart MyDNS. 

 To perform the import and restart MyDNS, perform the following steps:

  1. Run the following command as the root user to force a DNS import:

    /scripts/importmydnsdb --force


    You will receive a confirmation email when this command finishes. Do not proceed until you receive that email. 

  2. Run the following command as the root user to restart MyDNS:


MyDNS on your server

The system installs MyDNS to the /usr/local/cpanel/3rdparty/ directory. After installation, the system syncs the zone files in the /var/named/ directory with the records in the MyDNS database. 

Each server that uses MyDNS includes its own MySQL database for MyDNS. The server's database name corresponds to the mydns_hostname format, where hostname represents the server's hostname.

MyDNS on remote MySQL servers

cPanel & WHM's implementation of MyDNS can function with a remote MySQL server.

  • To set up the connection to the remote MySQL server, navigate to WHM's Manage MySQL® Profiles interface (Home >> SQL Services >> Setup Remote MySQL Server).
  • When you run MyDNS on a dedicated MySQL server, each connected server maintains its own unique database of zone files. The MySQL server retrieves these zone files from the servers and does not retain a central copy of them.

Troubleshoot MyDNS

Because MyDNS uses a MySQL database to store zone files, any problem with MySQL will affect MyDNS's performance. If you experience problems with MyDNS, first make certain that MySQL is responsive.

To confirm that MySQL responds to WHM, perform one of the following actions:

  • Navigate to WHM's Show MySQL Processes interface (Home >> SQL Services >> Show MySQL Processes). If MySQL is responsive, the SHOW PROCESSLIST query will display.
  • Run the following command as the root user:

    netstat -tap | grep mysql 

    If MySQL is responsive, a line that resembles to the following example will display:

    tcp        0      0 *:mysql                     *:*                         LISTEN      17280/mysqld 

To troubleshoot MyDNS further, check the following error logs:

  • /usr/local/cpanel/logs/error_log — The WHM error log.
  • /var/log/messages — The MyDNS error log.
  • /usr/local/cpanel/logs/dnsadmin_log — The dnsadmin error log. dnsadmin is the WHM process that interacts with DNS zone files.

Additional documentation