Database Management
Create and manage MySQL and PostgreSQL databases directly from your WHMCS client area.
MySQL Databases
Create Database
- Go to Databases section
- Click Create Database
- Enter database name (will be prefixed with username_)
- Click Create
Create Database User
- Click Create User
- Enter:
- Username: (will be prefixed with username_)
- Password: Strong password
- Click Create
Assign User to Database
- Find the database in the list
- Click Add User
- Select the user
- Choose privileges:
- ALL PRIVILEGES - Full access
- Or select individual permissions
- Click Add
Privileges Explained
| Privilege | Description |
|---|---|
| SELECT | Read data from tables |
| INSERT | Add new records |
| UPDATE | Modify existing records |
| DELETE | Remove records |
| CREATE | Create tables |
| DROP | Delete tables |
| INDEX | Create/drop indexes |
| ALTER | Modify table structure |
Remove User from Database
- Find the database
- Click the X next to the user
- Confirm removal
Delete Database
- Find the database in the list
- Click Delete
- Confirm deletion
warning
Deleting a database permanently removes all data. Always backup first!
Delete User
- Find the user in the users list
- Click Delete
- Confirm deletion
Remote MySQL
Allow external connections to your databases.
Add Remote Host
- Go to Remote MySQL tab
- Click Add Host
- Enter:
- IP Address: The server IP that needs access
- Or use
%for any host (not recommended)
- 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
- Go to PostgreSQL tab
- Click Create Database
- Enter database name
- Click Create
Create PostgreSQL User
- Click Create User
- Enter username and password
- Click Create
Assign User
- Find the database
- Click Add User
- Select user and privileges
- 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