Using the MysqlDump Stream and Troubleshooting MySQL Profiles in cPanel & WHM

This article explains how to use the experimental MysqlDump Stream feature to generate MySQL database dumps over WebSocket, how to authenticate using API tokens or Basic Authentication, required parameters, example commands, and how to troubleshoot common MySQL profile connection issues on remote servers.

MysqlDump StreamRemote MySQL TroubleshootingWebSocket Database Dump

~3 min read • Updated Feb 18, 2026

1. Introduction to the MysqlDump Stream


The MysqlDump Stream is an experimental feature in cPanel & WHM that allows you to stream a MySQL database dump over a WebSocket connection. You can request a dump from any computer without logging into the server directly. This is useful for remote backups and automation.


Warning: This feature is experimental and may change in future versions.


2. How to Use the MysqlDump Stream


To use this feature, connect via any WebSocket client and authenticate using either Basic HTTP Authentication or an API Token.


Use Basic HTTP Authentication


Follow the instructions in the Guide to API Authentication - Username and Password Authentication documentation.


Create an API Token in cPanel


cPanel » Home » Security » Manage API Tokens

Create an API Token in WHM


WHM » Home » Development » Manage API Tokens

Important: Only root or resellers with root‑level privileges can access the MysqlDump Stream in WHM.


3. MysqlDump Parameters


Parameter Description Example
dbname The name of the database to dump dbname=username_db
character_set Character set for the dump (utf8mb4 or utf8) character_set=utf8mb4
include_data Include table data (1 or 0) include_data=1

Note: Use --no-tablespaces if you encounter:


Incompatible Change: Access to the INFORMATION_SCHEMA.FILES table now requires the PROCESS privilege.

WebSocket Close Codes


  • 1000 — Success
  • 1011 — General error
  • 4000 — Collation error

4. Example: Streaming a Dump with wscat


wscat -H 'Authorization: cpanel username:API_TOKEN' \
-c 'wss://example.com:2083/websocket/MysqlDump?dbname=username_db1&include_data=1&encoding=utf8mb4' \
> /PATH/file.sql

Where:


  • username = cPanel username
  • API_TOKEN = cPanel API token
  • example.com = server hostname
  • file.sql = output file path

5. Troubleshooting MySQL Profiles


If you experience issues connecting to a remote MySQL server, review the following common errors and solutions.


DNS Resolution Errors


The server cannot resolve the hostname. Verify DNS configuration.


Invalid IP Address


Confirm the remote server’s IP address and ensure it is reachable.


Incorrect SSH Port


ss -pln | grep ssh

Invalid SSH Credentials


Verify the username and password for SSH access.


Host Not Allowed to Connect


mysql> CREATE USER 'user'@'hostname' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'user'@'hostname' WITH GRANT OPTION;

Lost Connection During Handshake (Error 110)


Firewall is blocking the port. Check firewall rules.


Cannot Connect to MySQL Server (Error 107)


MySQL is down or the port is incorrect.


ss -pln | grep mysql

Reverse DNS Warning


host 1.2.3.4

6. Changing the Remote MySQL Root Password


WHM » Home » SQL Services » MySQL Root Password

MySQL 8.0 on Remote Servers


validate-password.policy=0
validate-password.length=1
validate_password.special_char_count=0
validate_password.mixed_case_count=0
validate_password.number_count=0

MySQL 8.0 on Non‑cPanel Servers


mysql_native_password=ON
authentication_policy=mysql_native_password

Then run:


ALTER USER 'root'@'cpanel.server.host' IDENTIFIED WITH mysql_native_password BY 'StrongPassword123!';

Conclusion


Written & researched by Dr. Shahin Siami