<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[AdminsForum - CloudPanel Databases & phpMyAdmin Guides]]></title>
		<link>https://adminsforum.com/</link>
		<description><![CDATA[AdminsForum - https://adminsforum.com]]></description>
		<pubDate>Sun, 29 Nov 2026 09:28:00 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Fix Database Connection Errors in CloudPanel]]></title>
			<link>https://adminsforum.com/Thread-guide-fix-database-connection-errors-in-cloudpanel</link>
			<pubDate>Fri, 16 Oct 2026 14:19:53 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://adminsforum.com/member.php?action=profile&uid=2">DEV</a>]]></dc:creator>
			<guid isPermaLink="false">https://adminsforum.com/Thread-guide-fix-database-connection-errors-in-cloudpanel</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b">A database connection error does not always mean the database is down. In CloudPanel, first identify whether the failure is authentication, database selection, transport or the website runtime.</span><br />
<br />
This CloudPanel v2 diagnostic guide is checked against the official documentation. The image is an original workflow illustration; it is not a screenshot of a newly reproduced lab outage. Replace all example names with your own values.<br />
<br />
<img src="https://adminsforum.com/attachment.php?aid=347" loading="lazy"  alt="[Image: attachment.php?aid=347]" class="mycode_img" /><br />
<span style="font-style: italic;" class="mycode_i">AdminsForum workflow: read the exact error, test the same connection, fix one cause and verify the application.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Before you start</span><br />
You need access to the affected site's CloudPanel settings and its application configuration. SSH is needed for the optional command-line checks. Keep a protected copy of the configuration before editing it. Never paste database passwords, full connection URLs or unredacted .env files into a support thread.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">1. Find the exact error</span><br />
Open <span style="font-weight: bold;" class="mycode_b">Sites → affected site → Logs</span>, reproduce one harmless failed page request, and note the timestamp. Also inspect the application's private error log. A browser message such as “Error establishing a database connection” is only a summary.<br />
<ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">1045 / Access denied for user:</span> investigate the username, password and matching user host.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">1049 / Unknown database:</span> check the database name and that you connected to the intended server.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">1044 / Access denied to database:</span> the account may authenticate but lack access to that database.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">2002 / No such file or directory:</span> a local socket path may be wrong; it does not necessarily mean a website file is missing.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">2003 / Connection refused:</span> check the database service, address, port and listening interface.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">could not find driver:</span> check the PHP database extension used by the website.<br />
</li>
</ul>
Record the complete error privately. Do not turn on public error display on a live site. See our <a href="https://adminsforum.com/Thread-guide-cloudpanel-logs-find-and-troubleshoot-website-errors" target="_blank" rel="noopener" class="mycode_url">CloudPanel logs guide</a> for locating and correlating errors.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">2. Compare the application's connection settings</span><br />
In CloudPanel, open the site's <span style="font-weight: bold;" class="mycode_b">Databases</span> area. Compare the existing database name and database user with the application's configuration. CloudPanel's SSH/site user, panel login and database user are different accounts.<br />
<br />
Check the host, port, database name and username character by character. Read the existing password from your secure records rather than guessing. In a framework's .env file, special characters must follow that framework's quoting rules. A correct password can fail if a configuration parser truncates it at a comment character or interprets a connection URL incorrectly.<br />
<br />
For a migrated site, confirm that the database was actually imported. Creating an empty database with the expected name does not restore its tables. Do not overwrite an existing database as a connection-error experiment.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. Test with the website's database account</span><br />
For a local TCP connection, run the following on the website server. Use the host and port from the application's actual settings; 3306 is the usual example, not a guaranteed value.<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>mysql --protocol=TCP --host=127.0.0.1 --port=3306 --user=app_user --password app_database</code></div></div>Replace app_user and app_database. The client prompts for the password; do not place it after --password or in shell history. If your installation provides the mariadb client instead, use that client with the equivalent connection options.<br />
<br />
After a successful login, run these read-only checks:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>SELECT DATABASE(), CURRENT_USER();
SHOW TABLES;
SELECT 1;
SHOW GRANTS;
exit</code></div></div>DATABASE() should show the intended database. CURRENT_USER() identifies the account MySQL matched. SHOW TABLES should list the application's expected tables. SELECT 1 proves a basic query works, but does not prove the application can perform every required operation. Keep grant output private if it identifies internal hosts or accounts.<br />
<br />
If this test fails, follow the matching error branch below. If it succeeds but the website fails, focus on the website's runtime, cached configuration and connection settings rather than changing the database server.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. Separate socket and TCP problems</span><br />
On Unix, MySQL clients and PHP PDO_MYSQL commonly treat localhost as a Unix socket connection. Using 127.0.0.1 selects TCP. They are not automatically interchangeable: the listener, socket location and matched account can differ.<br />
<br />
If the application intentionally uses a socket, compare its configured socket path with the running server's actual socket path. If the intended setup is TCP, test TCP explicitly as above and use the application's documented host/port fields. Do not randomly alternate host values until one works without understanding the difference. A port setting alone may not force a localhost socket connection to use TCP.<br />
<br />
For a remote database, test from the application server, confirm the intended endpoint and use the provider's encrypted connection requirements. Never open database port 3306 to the whole internet to troubleshoot a local website.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">5. Resolve authentication or database-access errors</span><br />
For 1045, compare the database username and existing credential with the application configuration. The host named in the error is useful evidence. A successful login to phpMyAdmin using a different account does not prove the website account works.<br />
<br />
For 1049, verify spelling and whether the database belongs on this server. For 1044, inspect the selected database and the permissions assigned to that user in CloudPanel. CloudPanel supports database users with selected database permissions. Grant only what that application requires for its intended database; do not replace the website login with the MySQL root account or grant access to every database.<br />
<br />
If a password really must be reset, plan the change and update every dependent application, worker and scheduled task together. Random password resets can turn one failure into several. Back up before database migrations or other changes that modify data.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">6. Check the database service when connections are refused</span><br />
On a systemd server, these read-only commands help identify the installed service:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>systemctl list-units --type=service --all | grep -Ei 'mysql|mariadb'
sudo ss -ltnp | grep ':3306'
df -h
df -i</code></div></div>A missing TCP listener does not prove a socket-only server is stopped. Match the check to the intended transport. Inspect the actual unit you found, for example:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo systemctl status mysql --no-pager
sudo journalctl -u mysql --since '30 minutes ago' --no-pager</code></div></div>Use mariadb in place of mysql if that is the installed unit. Check for startup failures, disk exhaustion or memory-related termination. Do not repeatedly restart the database without reading the failure: this can interrupt other sites and hide the original evidence.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">7. Check PHP and cached application settings</span><br />
If the CLI connection works, confirm which PHP version the affected website uses in CloudPanel. A CLI PHP check can help, but it may inspect a different version or configuration from PHP-FPM:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>php -v
php -m | grep -Ei 'mysqli|pdo_mysql'</code></div></div>Match the required extension to the application's database driver and the website's actual PHP version. Do not leave a public phpinfo page or a credentials-based connection test online. After correcting configuration, follow the framework's documented configuration-cache procedure. Long-running application workers may also retain old settings; reload only the affected service when required.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">8. Verify the website, not just the login</span><br />
Repeat the original failed page and check its logs at the new timestamp. Test a normal database-backed page and, where appropriate, a reversible test operation. Confirm that scheduled jobs and background workers use the updated settings too. Remove temporary diagnostic files and keep the backup outside the public web directory.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">When asking for help</span><br />
Share the error code, redacted error message, CloudPanel/PHP/database versions, whether the same-account CLI test worked, and recent changes. Never share passwords or complete connection strings. This evidence lets support distinguish an account problem from a service or runtime problem quickly.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Official references</span><br />
<a href="https://www.cloudpanel.io/docs/v2/frontend-area/databases/" target="_blank" rel="noopener" class="mycode_url">CloudPanel database management</a><br />
<a href="https://dev.mysql.com/doc/refman/8.4/en/problems-connecting.html" target="_blank" rel="noopener" class="mycode_url">MySQL connection troubleshooting</a><br />
<a href="https://www.php.net/manual/en/ref.pdo-mysql.connection.php" target="_blank" rel="noopener" class="mycode_url">PHP PDO_MYSQL connection settings</a><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=347" target="_blank" title="">cloudpanel-db-connect-20261016.png</a> (Size: 55.94 KB / Downloads: 38)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b">A database connection error does not always mean the database is down. In CloudPanel, first identify whether the failure is authentication, database selection, transport or the website runtime.</span><br />
<br />
This CloudPanel v2 diagnostic guide is checked against the official documentation. The image is an original workflow illustration; it is not a screenshot of a newly reproduced lab outage. Replace all example names with your own values.<br />
<br />
<img src="https://adminsforum.com/attachment.php?aid=347" loading="lazy"  alt="[Image: attachment.php?aid=347]" class="mycode_img" /><br />
<span style="font-style: italic;" class="mycode_i">AdminsForum workflow: read the exact error, test the same connection, fix one cause and verify the application.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Before you start</span><br />
You need access to the affected site's CloudPanel settings and its application configuration. SSH is needed for the optional command-line checks. Keep a protected copy of the configuration before editing it. Never paste database passwords, full connection URLs or unredacted .env files into a support thread.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">1. Find the exact error</span><br />
Open <span style="font-weight: bold;" class="mycode_b">Sites → affected site → Logs</span>, reproduce one harmless failed page request, and note the timestamp. Also inspect the application's private error log. A browser message such as “Error establishing a database connection” is only a summary.<br />
<ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">1045 / Access denied for user:</span> investigate the username, password and matching user host.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">1049 / Unknown database:</span> check the database name and that you connected to the intended server.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">1044 / Access denied to database:</span> the account may authenticate but lack access to that database.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">2002 / No such file or directory:</span> a local socket path may be wrong; it does not necessarily mean a website file is missing.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">2003 / Connection refused:</span> check the database service, address, port and listening interface.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">could not find driver:</span> check the PHP database extension used by the website.<br />
</li>
</ul>
Record the complete error privately. Do not turn on public error display on a live site. See our <a href="https://adminsforum.com/Thread-guide-cloudpanel-logs-find-and-troubleshoot-website-errors" target="_blank" rel="noopener" class="mycode_url">CloudPanel logs guide</a> for locating and correlating errors.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">2. Compare the application's connection settings</span><br />
In CloudPanel, open the site's <span style="font-weight: bold;" class="mycode_b">Databases</span> area. Compare the existing database name and database user with the application's configuration. CloudPanel's SSH/site user, panel login and database user are different accounts.<br />
<br />
Check the host, port, database name and username character by character. Read the existing password from your secure records rather than guessing. In a framework's .env file, special characters must follow that framework's quoting rules. A correct password can fail if a configuration parser truncates it at a comment character or interprets a connection URL incorrectly.<br />
<br />
For a migrated site, confirm that the database was actually imported. Creating an empty database with the expected name does not restore its tables. Do not overwrite an existing database as a connection-error experiment.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. Test with the website's database account</span><br />
For a local TCP connection, run the following on the website server. Use the host and port from the application's actual settings; 3306 is the usual example, not a guaranteed value.<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>mysql --protocol=TCP --host=127.0.0.1 --port=3306 --user=app_user --password app_database</code></div></div>Replace app_user and app_database. The client prompts for the password; do not place it after --password or in shell history. If your installation provides the mariadb client instead, use that client with the equivalent connection options.<br />
<br />
After a successful login, run these read-only checks:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>SELECT DATABASE(), CURRENT_USER();
SHOW TABLES;
SELECT 1;
SHOW GRANTS;
exit</code></div></div>DATABASE() should show the intended database. CURRENT_USER() identifies the account MySQL matched. SHOW TABLES should list the application's expected tables. SELECT 1 proves a basic query works, but does not prove the application can perform every required operation. Keep grant output private if it identifies internal hosts or accounts.<br />
<br />
If this test fails, follow the matching error branch below. If it succeeds but the website fails, focus on the website's runtime, cached configuration and connection settings rather than changing the database server.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. Separate socket and TCP problems</span><br />
On Unix, MySQL clients and PHP PDO_MYSQL commonly treat localhost as a Unix socket connection. Using 127.0.0.1 selects TCP. They are not automatically interchangeable: the listener, socket location and matched account can differ.<br />
<br />
If the application intentionally uses a socket, compare its configured socket path with the running server's actual socket path. If the intended setup is TCP, test TCP explicitly as above and use the application's documented host/port fields. Do not randomly alternate host values until one works without understanding the difference. A port setting alone may not force a localhost socket connection to use TCP.<br />
<br />
For a remote database, test from the application server, confirm the intended endpoint and use the provider's encrypted connection requirements. Never open database port 3306 to the whole internet to troubleshoot a local website.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">5. Resolve authentication or database-access errors</span><br />
For 1045, compare the database username and existing credential with the application configuration. The host named in the error is useful evidence. A successful login to phpMyAdmin using a different account does not prove the website account works.<br />
<br />
For 1049, verify spelling and whether the database belongs on this server. For 1044, inspect the selected database and the permissions assigned to that user in CloudPanel. CloudPanel supports database users with selected database permissions. Grant only what that application requires for its intended database; do not replace the website login with the MySQL root account or grant access to every database.<br />
<br />
If a password really must be reset, plan the change and update every dependent application, worker and scheduled task together. Random password resets can turn one failure into several. Back up before database migrations or other changes that modify data.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">6. Check the database service when connections are refused</span><br />
On a systemd server, these read-only commands help identify the installed service:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>systemctl list-units --type=service --all | grep -Ei 'mysql|mariadb'
sudo ss -ltnp | grep ':3306'
df -h
df -i</code></div></div>A missing TCP listener does not prove a socket-only server is stopped. Match the check to the intended transport. Inspect the actual unit you found, for example:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo systemctl status mysql --no-pager
sudo journalctl -u mysql --since '30 minutes ago' --no-pager</code></div></div>Use mariadb in place of mysql if that is the installed unit. Check for startup failures, disk exhaustion or memory-related termination. Do not repeatedly restart the database without reading the failure: this can interrupt other sites and hide the original evidence.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">7. Check PHP and cached application settings</span><br />
If the CLI connection works, confirm which PHP version the affected website uses in CloudPanel. A CLI PHP check can help, but it may inspect a different version or configuration from PHP-FPM:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>php -v
php -m | grep -Ei 'mysqli|pdo_mysql'</code></div></div>Match the required extension to the application's database driver and the website's actual PHP version. Do not leave a public phpinfo page or a credentials-based connection test online. After correcting configuration, follow the framework's documented configuration-cache procedure. Long-running application workers may also retain old settings; reload only the affected service when required.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">8. Verify the website, not just the login</span><br />
Repeat the original failed page and check its logs at the new timestamp. Test a normal database-backed page and, where appropriate, a reversible test operation. Confirm that scheduled jobs and background workers use the updated settings too. Remove temporary diagnostic files and keep the backup outside the public web directory.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">When asking for help</span><br />
Share the error code, redacted error message, CloudPanel/PHP/database versions, whether the same-account CLI test worked, and recent changes. Never share passwords or complete connection strings. This evidence lets support distinguish an account problem from a service or runtime problem quickly.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Official references</span><br />
<a href="https://www.cloudpanel.io/docs/v2/frontend-area/databases/" target="_blank" rel="noopener" class="mycode_url">CloudPanel database management</a><br />
<a href="https://dev.mysql.com/doc/refman/8.4/en/problems-connecting.html" target="_blank" rel="noopener" class="mycode_url">MySQL connection troubleshooting</a><br />
<a href="https://www.php.net/manual/en/ref.pdo-mysql.connection.php" target="_blank" rel="noopener" class="mycode_url">PHP PDO_MYSQL connection settings</a><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=347" target="_blank" title="">cloudpanel-db-connect-20261016.png</a> (Size: 55.94 KB / Downloads: 38)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[CloudPanel Databases: Create a Database, Users and Use phpMyAdmin]]></title>
			<link>https://adminsforum.com/Thread-guide-cloudpanel-databases-create-a-database-users-and-use-phpmyadmin</link>
			<pubDate>Wed, 14 Oct 2026 21:09:13 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://adminsforum.com/member.php?action=profile&uid=1">JAY</a>]]></dc:creator>
			<guid isPermaLink="false">https://adminsforum.com/Thread-guide-cloudpanel-databases-create-a-database-users-and-use-phpmyadmin</guid>
			<description><![CDATA[<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">CloudPanel databases: create a database and users, and use phpMyAdmin</span></span><br />
<br />
In CloudPanel, <span style="font-weight: bold;" class="mycode_b">databases belong to a site</span>. This guide shows how to create a database and user, add extra users with limited rights, open phpMyAdmin, handle large imports from the command line, and where CloudPanel keeps automatic database backups. Tested on CloudPanel 2.5.4, Ubuntu 24.04, MySQL 8.4.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 1: Open the site's Databases tab</span></span><br />
Open <span style="font-weight: bold;" class="mycode_b">Sites</span> → <span style="font-weight: bold;" class="mycode_b">Manage</span> → <span style="font-weight: bold;" class="mycode_b">Databases</span>. Our WordPress database is already listed, created by the one-click installer. Note the connection details at the top: host <span style="font-weight: bold;" class="mycode_b">127.0.0.1</span>, port <span style="font-weight: bold;" class="mycode_b">3306</span>. Your app uses these.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=298" target="_blank" title="">g4-01-ae34.jpg</a> (Size: 103.25 KB / Downloads: 53)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 2: Add a database</span></span><br />
Click <span style="font-weight: bold;" class="mycode_b">Add Database</span> and enter a database name, a database user name and a password. CloudPanel creates both and grants the user access in one step.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 3: Add extra database users</span></span><br />
The <span style="font-weight: bold;" class="mycode_b">Database Users</span> list shows every user, the database it can reach and its permissions. Use <span style="font-weight: bold;" class="mycode_b">Add Database User</span> for extra users, with <span style="font-weight: bold;" class="mycode_b">Read and Write</span> or <span style="font-weight: bold;" class="mycode_b">Read Only</span> access. A read-only user is ideal for reporting or backup tools, which then can never change your data.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=299" target="_blank" title="">g4-02-ae36.jpg</a> (Size: 104.64 KB / Downloads: 55)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 4: Open phpMyAdmin with one click</span></span><br />
Click <span style="font-weight: bold;" class="mycode_b">Manage</span> next to a database user and phpMyAdmin opens already logged in as that user, with no extra password to type. Browse tables, run SQL, and import or export from the tabs at the top.<br />
<br />
On the right, phpMyAdmin shows the server. On our install it's <span style="font-weight: bold;" class="mycode_b">Percona Server 8.4</span>, a drop-in MySQL build, chosen when we ran the installer.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=300" target="_blank" title="">g4-03-ae38.jpg</a> (Size: 178.15 KB / Downloads: 49)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 5: Big imports and exports with clpctl</span></span><br />
Large databases can time out in the browser. As root, use clpctl instead:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code># export a compressed dump
clpctl db:export --databaseName=my-database --file=/tmp/dump.sql.gz

# import a dump
clpctl db:import --databaseName=my-database --file=/tmp/dump.sql.gz

# create a database and user from the shell
clpctl db:add --domainName=example.com --databaseName=my-database --databaseUserName=myuser --databaseUserPassword='a-strong-password'

# show the database root (master) login
clpctl db:show:master-credentials</code></div></div><br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Automatic database backups</span></span><br />
CloudPanel also dumps every database automatically each night (at 03:15 on our server) into the <span style="font-weight: bold;" class="mycode_b">backups</span> folder in the site user's home, and keeps 7 days of them. It's a useful safety net, but it's on the same server, so also set up <span style="font-weight: bold;" class="mycode_b">remote backups</span> in the Admin Area.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=301" target="_blank" title="">g4-04-ae45.jpg</a> (Size: 132.72 KB / Downloads: 48)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Tips</span></span><ul class="mycode_list"><li>Give each app its own database user, and use read-only users wherever writing isn't needed.<br />
</li>
<li>Never expose port 3306 in the firewall; apps on the same server connect via 127.0.0.1.<br />
</li>
<li>Keep the master credentials for emergencies only.<br />
</li>
</ul>
<br />
Questions? Ask in <span style="font-weight: bold;" class="mycode_b">CloudPanel Databases &amp; phpMyAdmin Support</span>.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">CloudPanel guide series</span></span><br />
<ol type="1" class="mycode_list"><li><a href="https://adminsforum.com/Thread-guide-what-is-cloudpanel-complete-overview-of-the-free-hosting-control-panel-2026" target="_blank" rel="noopener" class="mycode_url">What is CloudPanel? Complete overview</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-system-requirements-2026-os-cpu-ram-disk-and-ports" target="_blank" rel="noopener" class="mycode_url">CloudPanel system requirements</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-features-the-complete-list-2026" target="_blank" rel="noopener" class="mycode_url">CloudPanel features: the complete list</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-create-a-php-site-in-cloudpanel-step-by-step-2026" target="_blank" rel="noopener" class="mycode_url">How to create a PHP site</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-install-a-free-let-s-encrypt-ssl-certificate-in-cloudpanel" target="_blank" rel="noopener" class="mycode_url">How to install free Let's Encrypt SSL</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-install-wordpress-in-cloudpanel-one-click-setup-guide" target="_blank" rel="noopener" class="mycode_url">How to install WordPress (one-click)</a><br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Databases, users and phpMyAdmin</span> (you are here)<br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-ssh-sftp-ftp-and-file-manager-how-to-upload-files" target="_blank" rel="noopener" class="mycode_url">SSH, SFTP, FTP and File Manager</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-cron-jobs-logs-and-varnish-cache-complete-guide" target="_blank" rel="noopener" class="mycode_url">Cron jobs, logs and Varnish Cache</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-backups-and-security-remote-backups-firewall-and-basic-auth" target="_blank" rel="noopener" class="mycode_url">Backups, firewall and Basic Auth</a><br />
</li>
</ol>
]]></description>
			<content:encoded><![CDATA[<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">CloudPanel databases: create a database and users, and use phpMyAdmin</span></span><br />
<br />
In CloudPanel, <span style="font-weight: bold;" class="mycode_b">databases belong to a site</span>. This guide shows how to create a database and user, add extra users with limited rights, open phpMyAdmin, handle large imports from the command line, and where CloudPanel keeps automatic database backups. Tested on CloudPanel 2.5.4, Ubuntu 24.04, MySQL 8.4.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 1: Open the site's Databases tab</span></span><br />
Open <span style="font-weight: bold;" class="mycode_b">Sites</span> → <span style="font-weight: bold;" class="mycode_b">Manage</span> → <span style="font-weight: bold;" class="mycode_b">Databases</span>. Our WordPress database is already listed, created by the one-click installer. Note the connection details at the top: host <span style="font-weight: bold;" class="mycode_b">127.0.0.1</span>, port <span style="font-weight: bold;" class="mycode_b">3306</span>. Your app uses these.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=298" target="_blank" title="">g4-01-ae34.jpg</a> (Size: 103.25 KB / Downloads: 53)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 2: Add a database</span></span><br />
Click <span style="font-weight: bold;" class="mycode_b">Add Database</span> and enter a database name, a database user name and a password. CloudPanel creates both and grants the user access in one step.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 3: Add extra database users</span></span><br />
The <span style="font-weight: bold;" class="mycode_b">Database Users</span> list shows every user, the database it can reach and its permissions. Use <span style="font-weight: bold;" class="mycode_b">Add Database User</span> for extra users, with <span style="font-weight: bold;" class="mycode_b">Read and Write</span> or <span style="font-weight: bold;" class="mycode_b">Read Only</span> access. A read-only user is ideal for reporting or backup tools, which then can never change your data.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=299" target="_blank" title="">g4-02-ae36.jpg</a> (Size: 104.64 KB / Downloads: 55)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 4: Open phpMyAdmin with one click</span></span><br />
Click <span style="font-weight: bold;" class="mycode_b">Manage</span> next to a database user and phpMyAdmin opens already logged in as that user, with no extra password to type. Browse tables, run SQL, and import or export from the tabs at the top.<br />
<br />
On the right, phpMyAdmin shows the server. On our install it's <span style="font-weight: bold;" class="mycode_b">Percona Server 8.4</span>, a drop-in MySQL build, chosen when we ran the installer.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=300" target="_blank" title="">g4-03-ae38.jpg</a> (Size: 178.15 KB / Downloads: 49)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 5: Big imports and exports with clpctl</span></span><br />
Large databases can time out in the browser. As root, use clpctl instead:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code># export a compressed dump
clpctl db:export --databaseName=my-database --file=/tmp/dump.sql.gz

# import a dump
clpctl db:import --databaseName=my-database --file=/tmp/dump.sql.gz

# create a database and user from the shell
clpctl db:add --domainName=example.com --databaseName=my-database --databaseUserName=myuser --databaseUserPassword='a-strong-password'

# show the database root (master) login
clpctl db:show:master-credentials</code></div></div><br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Automatic database backups</span></span><br />
CloudPanel also dumps every database automatically each night (at 03:15 on our server) into the <span style="font-weight: bold;" class="mycode_b">backups</span> folder in the site user's home, and keeps 7 days of them. It's a useful safety net, but it's on the same server, so also set up <span style="font-weight: bold;" class="mycode_b">remote backups</span> in the Admin Area.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=301" target="_blank" title="">g4-04-ae45.jpg</a> (Size: 132.72 KB / Downloads: 48)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Tips</span></span><ul class="mycode_list"><li>Give each app its own database user, and use read-only users wherever writing isn't needed.<br />
</li>
<li>Never expose port 3306 in the firewall; apps on the same server connect via 127.0.0.1.<br />
</li>
<li>Keep the master credentials for emergencies only.<br />
</li>
</ul>
<br />
Questions? Ask in <span style="font-weight: bold;" class="mycode_b">CloudPanel Databases &amp; phpMyAdmin Support</span>.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">CloudPanel guide series</span></span><br />
<ol type="1" class="mycode_list"><li><a href="https://adminsforum.com/Thread-guide-what-is-cloudpanel-complete-overview-of-the-free-hosting-control-panel-2026" target="_blank" rel="noopener" class="mycode_url">What is CloudPanel? Complete overview</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-system-requirements-2026-os-cpu-ram-disk-and-ports" target="_blank" rel="noopener" class="mycode_url">CloudPanel system requirements</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-features-the-complete-list-2026" target="_blank" rel="noopener" class="mycode_url">CloudPanel features: the complete list</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-create-a-php-site-in-cloudpanel-step-by-step-2026" target="_blank" rel="noopener" class="mycode_url">How to create a PHP site</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-install-a-free-let-s-encrypt-ssl-certificate-in-cloudpanel" target="_blank" rel="noopener" class="mycode_url">How to install free Let's Encrypt SSL</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-install-wordpress-in-cloudpanel-one-click-setup-guide" target="_blank" rel="noopener" class="mycode_url">How to install WordPress (one-click)</a><br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Databases, users and phpMyAdmin</span> (you are here)<br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-ssh-sftp-ftp-and-file-manager-how-to-upload-files" target="_blank" rel="noopener" class="mycode_url">SSH, SFTP, FTP and File Manager</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-cron-jobs-logs-and-varnish-cache-complete-guide" target="_blank" rel="noopener" class="mycode_url">Cron jobs, logs and Varnish Cache</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-backups-and-security-remote-backups-firewall-and-basic-auth" target="_blank" rel="noopener" class="mycode_url">Backups, firewall and Basic Auth</a><br />
</li>
</ol>
]]></content:encoded>
		</item>
	</channel>
</rss>