Skip to main content

Database Management

Create and manage MySQL and PostgreSQL databases directly from your WHMCS client area.

MySQL Databases

Create Database

  1. Go to Databases section
  2. Click Create Database
  3. Enter database name (will be prefixed with username_)
  4. Click Create

Create Database User

  1. Click Create User
  2. Enter:
    • Username: (will be prefixed with username_)
    • Password: Strong password
  3. Click Create

Assign User to Database

  1. Find the database in the list
  2. Click Add User
  3. Select the user
  4. Choose privileges:
    • ALL PRIVILEGES - Full access
    • Or select individual permissions
  5. Click Add

Privileges Explained

PrivilegeDescription
SELECTRead data from tables
INSERTAdd new records
UPDATEModify existing records
DELETERemove records
CREATECreate tables
DROPDelete tables
INDEXCreate/drop indexes
ALTERModify table structure

Remove User from Database

  1. Find the database
  2. Click the X next to the user
  3. Confirm removal

Delete Database

  1. Find the database in the list
  2. Click Delete
  3. Confirm deletion
warning

Deleting a database permanently removes all data. Always backup first!

Delete User

  1. Find the user in the users list
  2. Click Delete
  3. Confirm deletion

Remote MySQL

Allow external connections to your databases.

Add Remote Host

  1. Go to Remote MySQL tab
  2. Click Add Host
  3. Enter:
    • IP Address: The server IP that needs access
    • Or use % for any host (not recommended)
  4. Click Add

Remove Remote Host

Click Delete next to the host.

phpMyAdmin

Click phpMyAdmin to access the web-based database management tool.

Features:

  • Browse and edit data
  • Run SQL queries
  • Import/export databases
  • Manage tables and indexes

PostgreSQL

Create PostgreSQL Database

  1. Go to PostgreSQL tab
  2. Click Create Database
  3. Enter database name
  4. Click Create

Create PostgreSQL User

  1. Click Create User
  2. Enter username and password
  3. Click Create

Assign User

  1. Find the database
  2. Click Add User
  3. Select user and privileges
  4. Click Add

Best Practices

Security

  • Use strong, unique passwords
  • Limit remote access to specific IPs
  • Grant minimum required privileges
  • Regularly backup databases

Performance

  • Add indexes for frequently queried columns
  • Optimize tables periodically
  • Monitor slow query log

Naming Conventions

  • Use descriptive names: store_products, blog_posts
  • Be consistent with prefixes
  • Avoid special characters