Technical documentation for Hovixa users detailing database creation, user provisioning, and granular SQL privilege assignment using the cPanel MySQL Database Wizard.
Managing MySQL Databases and Privileges via MySQL Database Wizard
The cPanel MySQL Database Wizard provides a sequential interface that abstracts the underlying SQL commands (CREATE DATABASE, CREATE USER, and GRANT). This workflow guarantees the correct binding of users to databases without requiring manual command-line query execution.
Phase 1: Database Creation
cPanel enforces a strict namespace convention on shared environments. Your database name is permanently prefixed with your cPanel username and an underscore (e.g., cpaneluser_). This prevents collisions across the server.
- Log in to cpanel.hovixa.com.
- Navigate to the Databases section and initialize the MySQL Database Wizard.
- Step 1: Create a Database. Input your desired database suffix. The system concatenates this with your prefix (producing, for example,
cpaneluser_appdb). - Click Next Step.
Phase 2: User Provisioning
Databases and users are distinct entities in the MySQL/MariaDB architecture. A database is inaccessible until a user is explicitly created and granted rights to it.
- Step 2: Create Database Users. Input a username suffix. Like the database name, this is prepended with your account username. Note: Database username strings often have strict length limits (e.g., 16 or 32 characters) depending on the engine version. Keep suffixes brief.
- Password: Generate a cryptographically secure password. Utilize the built-in Password Generator to meet the server's minimum strength enforcement (typically > 65).
- Copy and store this password in a secure vault immediately. The server hashes this string; it cannot be retrieved in plaintext later.
- Click Create User.
Phase 3: Privilege Assignment
You must map the new user to the database by granting specific SQL execution privileges. The principle of least privilege dictates granting only what the application explicitly requires to function.
- Step 3: Add User to the Database. The interface presents a matrix of specific SQL privileges (
SELECT,INSERT,UPDATE,DELETE,DROP, etc.). - For a standard CMS deployment (e.g., WordPress, Joomla), select the ALL PRIVILEGES checkbox.
- Security Implementation: If you are provisioning a user strictly for automated backup scripts, grant only
SELECTandLOCK TABLES. If provisioning for a read-only reporting dashboard, grant onlySELECT. Do not assignDROPorDELETErights to non-administrative application users. - Click Make Changes.
Implementation Details
- Host Constraint: Users provisioned via this wizard are strictly bound to the
localhosthost definition. If your architecture requires external database connections (e.g., connecting fromvm.hovixa.comtocpanel.hovixa.com), you must explicitly whitelist the remote IP address using the Remote MySQL tool in cPanel. - Configuration Files: When updating your application's
.envorwp-config.phpfiles, you must use the fully concatenated strings (e.g.,DB_NAME=cpaneluser_appdb,DB_USER=cpaneluser_dbuser) and define the host aslocalhostor127.0.0.1.