CyberPanel Bug Report - PowerDNS Authentication Issue

System Information

  • Server: Ubuntu 22.04.5 LTS (GNU/Linux 6.8.0-1027-oracle aarch64)
  • Current Version: 2.4
  • Build: 1
  • Current Commit: 03e8bbbf54fcea4802396d2d17ea8aa3fec58e0f
  • Latest Version: 2.4
  • Latest Build: 1
  • Latest Commit: 03e8bbbf54fcea4802396d2d17ea8aa3fec58e0f

Issue Summary
PowerDNS service fails to start due to MySQL authentication error after server downtime/reboot cycles.

Problem Description
Following a period of server instability (June 24-25, 2025) with multiple reboots and network connectivity issues, PowerDNS consistently fails to connect to the MariaDB database with the following error:

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

Technical Analysis

What’s Working :white_check_mark:

  • MariaDB 11.8.2 is running and operational
  • Database cyberpanel exists with all required tables
  • User cyberpanel@localhost exists in MariaDB
  • User has correct privileges: GRANT ALL PRIVILEGES ON cyberpanel.* TO cyberpanel@localhost
  • Root MySQL access via /root/.my.cnf works perfectly
  • All websites are now working but were down between 10 or 11 pm on 24 of June until 12.24pm on the 25th

What’s Failing :cross_mark:

  • PowerDNS cannot authenticate with MariaDB using configured credentials
  • Authentication test fails: ERROR 1045 (28000): Access denied for user 'cyberpanel'@'localhost' (using password: YES)

Configuration Details

PowerDNS configuration (/etc/powerdns/pdns.conf):

launch=gmysql
gmysql-host=localhost
gmysql-port=3306
gmysql-user=cyberpanel
gmysql-password=[configured_password]
gmysql-dbname=cyberpanel

Root Cause
Password mismatch between PowerDNS configuration and MariaDB user cyberpanel. The authentication credentials appear to have become desynchronized during the system instability period.

Impact

  • PowerDNS service fails to start
  • DNS management through CyberPanel panel may be affected
  • Core website functionality remains operational

Request
Please provide guidance on the proper procedure to restore the original CyberPanel PowerDNS authentication configuration without breaking the existing setup.

Error Logs
Jun 25 12:22:43 cp pdns_server[1579]: gmysql Connection failed: Unable to connect to database: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
Jun 25 12:22:43 cp pdns_server[1579]: Fatal error: Unable to launch gmysql connection