AdminsForum

CyberPanel Databases & phpMyAdmin Guides

Guide CyberPanel Databases: Create a MySQL Database, Users and Use phpMyAdmin

Started by JAY 0 replies 97 views
1JAY
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#1
CyberPanel Databases: Create a MySQL Database, Users and Use phpMyAdmin

Almost every PHP app (WordPress, Laravel, forums, shops) needs a database. CyberPanel runs MariaDB (10.11 on our server), and you manage it from Databases & FTP. Here's how to create one, find it later, open it in phpMyAdmin and move data in and out.

Watch it: Part 7 of the CyberPanel course, Databases & phpMyAdmin

This is Part 7 of 10 in our free CyberPanel Full Course. The written steps below go into more detail.

Create a database and user
Open Databases & FTP > Create Database and pick the website first. The name and user fields then appear:
[Image: attachment.php?aid=458]
  • Database Name and Database User: CyberPanel adds a prefix based on the domain, and shows the final name in a green box under each field. For our site cyber.adminslab.com,
    Code:
    wp
    became
    Code:
    cyber_wp
    . Use the full prefixed names in your app's config.
  • Password: click Generate, then Use This Password. Copy it before you leave the page; you can't read it back later (only change it).
Click Create Database. A green message confirms the database name and user. Each database gets its own user with access to that database only, which is what you want.

Find your databases later
Databases & FTP > List Databases, choose the domain, and you see every database of that site:
[Image: attachment.php?aid=462]

For each database you can:
  • Change the password. Remember to update the app's config file too (for WordPress,
    Code:
    DB_PASSWORD
    in wp-config.php), or the site shows a database error.
  • Manage remote access (see below).
  • Delete it. This removes the data for good; take a backup first.

phpMyAdmin
Databases & FTP > phpMyAdmin opens phpMyAdmin already logged in, no password needed:
[Image: attachment.php?aid=562]

On our server it was phpMyAdmin 5.2.1, connected as
Code:
root@localhost
when opened from the admin account. That means full access to every database on the server, including CyberPanel's own
Code:
cyberpanel
database. Be careful:
  • Don't edit or drop the
    Code:
    cyberpanel
    ,
    Code:
    mysql
    ,
    Code:
    information_schema
    ,
    Code:
    performance_schema
    or
    Code:
    sys
    databases.
  • Anyone who gets into your admin account gets this too, so protect it with 2FA: see first steps after install.
Good everyday uses: browse tables, run a quick SQL query, fix a WordPress URL in
Code:
wp_options
, export a small database.

Import and export from SSH (better for big databases)
Uploads through a browser hit PHP size and time limits. For anything over a few dozen MB, use the command line. Export:
Code:
mysqldump --single-transaction cyber_wp | gzip > /root/cyber_wp-$(date +%F).sql.gz
Import into an existing (empty) database:
Code:
gunzip < /root/cyber_wp-2026-10-24.sql.gz | mysql cyber_wp
As root on our server,
Code:
mysql
and
Code:
mysqldump
connected without asking for a password. If yours asks, use the database's own user:
Code:
mysql -u cyber_wp -p cyber_wp < file.sql

Quick checks:
Code:
mysql -e "SHOW DATABASES;" mysql -e "SELECT user,host FROM mysql.user;"

Remote access (connect from your PC or another server)
By default a database only accepts connections from the server itself (
Code:
localhost
). That's the safe setting. If you really need remote access, for example a reporting tool on another server, click Manage next to the database. The Remote Access dialog shows who may connect now; on ours, only
Code:
cyber_wp
from
Code:
localhost
:
[Image: attachment.php?aid=548]

  1. Enter only the specific IP address that needs access and click Save Changes. The dialog accepts
    Code:
    %
    wildcards; avoid them, and never use a lone
    Code:
    %
    (any host).
  2. Open port
    Code:
    3306
    in the firewall for that IP only, not for everyone. See the CyberPanel firewall guide.
A safer alternative with nothing to open: an SSH tunnel. From your PC:
Code:
ssh -L 3306:127.0.0.1:3306 root@YOUR-SERVER-IP
, then connect your database tool to
Code:
127.0.0.1:3306
.

Common problems
  • Access denied for user: you used the short name instead of the prefixed one, or the wrong password. Reset it with Change.
  • Can't connect to local MySQL server through socket: MariaDB is stopped. See checking CyberPanel services, and the Server Error (500) fix if the panel is down too.
  • phpMyAdmin import fails on a big file: use the SSH import above.
  • Database disk usage counts toward the package's disk limit; see packages, users and ACLs.
Setting up WordPress? Follow install WordPress with LiteSpeed Cache.

More CyberPanel guides
Tested on CyberPanel 3.0 (build 8, OpenLiteSpeed edition) on Ubuntu 24.04, October 2026. Menu names can change slightly between versions.

Attached Files

Image(s)
           
Reply

Messages In This Thread
CyberPanel Databases: Create a MySQL Database, Users and Use phpMyAdmin - by JAY - 10-25-2026, 07:16 PM
Possibly Related Threads…matched by title
Replies:0Views:84
Replies:0Views:80

Users browsing this thread: 1 Guest(s)
Forum Jump: