Hostxpeed
Login Get Started →
Control Panel

How to Create Database in HestiaCP

6 min read
24 views
Jun 12, 2026

Prerequisites

Before creating a database, make sure you have:

  • Access to HestiaCP control panel
  • MySQL or MariaDB service enabled

Method 1: Create via HestiaCP Web Interface

Step 1: Log in to HestiaCP

https://YOUR_SERVER_IP:8083

Step 2: Navigate to DB Section

Click on DB in the top menu bar.

Step 3: Click "Add Database"

Click the green + Add Database button.

Step 4: Configure Database

  • Database Name: Enter your database name (e.g., mywebsite_db)
  • Username: Enter database username (e.g., mywebsite_user)
  • Password: Enter a strong password or click Generate
  • Database Type: Select MySQL or MariaDB (usually mysql)

Step 5: Save Database

Click Save button to create the database.

Method 2: Create via Command Line (SSH)

Connect to your VPS:

ssh hxroot@YOUR_SERVER_IP -p 22

Login to MySQL as root:

mysql -u root -p

Create database:

CREATE DATABASE mywebsite_db;

Create user and password:

CREATE USER 'mywebsite_user'@'localhost' IDENTIFIED BY 'StrongPassword123!';

Grant privileges:

GRANT ALL PRIVILEGES ON mywebsite_db.* TO 'mywebsite_user'@'localhost';

Apply changes:

FLUSH PRIVILEGES;

Exit MySQL:

EXIT;

Method 3: Using HestiaCP Command Line

As root user:

v-add-database USER DATABASE DBUSER PASSWORD

Example:

v-add-database admin mywebsite_db mywebsite_user StrongPassword123!

Connect Database to WordPress

Edit wp-config.php:

define( 'DB_NAME', 'mywebsite_db' );
define( 'DB_USER', 'mywebsite_user' );
define( 'DB_PASSWORD', 'StrongPassword123!' );
define( 'DB_HOST', 'localhost' );

Connect Database to Laravel

Edit .env file:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=mywebsite_db
DB_USERNAME=mywebsite_user
DB_PASSWORD=StrongPassword123!

Manage Database in HestiaCP

View Database Details: Click on database name in DB section.

Delete Database: Click red trash icon next to database.

Change Password: Click lock icon next to user.

Access phpMyAdmin: Click DB icon to open phpMyAdmin interface.

Database Backup in HestiaCP

From command line:

v-backup-database USER DATABASE

Example:

v-backup-database admin mywebsite_db

Restore database:

v-restore-database USER DATABASE backup_file.sql

Common Database Issues

"Access denied for user": Check username and password are correct.

"Can't connect to MySQL": Ensure MySQL service is running: systemctl status mysql

Database shows in phpMyAdmin but not in HestiaCP: Run v-update-sys-db to resync.

Remove Database Completely

Via HestiaCP web interface: Click Delete

Via command line:

v-delete-database USER DATABASE
mysql -u root -p
DROP DATABASE mywebsite_db;
DROP USER 'mywebsite_user'@'localhost';

✅ You can now create and manage databases for your websites using HestiaCP on your Hostxpeed VPS.

Was this article helpful?