Knowledge Base

Database Management in Enhance

Database Management in Enhance

Databases are the backbone of most modern websites - from WordPress blogs to custom web applications. Here's everything you need to know about managing your databases in Enhance.

Understanding Databases

What is a database? Think of it as a super-organised filing cabinet for your website. Instead of folders and papers, you have tables and rows of data. Your WordPress posts, WooCommerce products, and customer information all live in your database.

Enhance supports MySQL and MariaDB databases - they're essentially interchangeable for most purposes.

Creating a Database

Step-by-Step

  1. Navigate to Websites > Your Domain > Databases
  2. Click + Create Database
  3. Enter a database name (keep it simple and descriptive)
  4. The database will be created instantly

[SCREENSHOT: The Create Database dialog with the database name field]

Naming Tips: Use lowercase letters, numbers, and underscores. Avoid spaces and special characters. Examples: wordpress_blog, shop_db, mysite_production.

Managing Database Users

Every database needs at least one user account to access it. Think of the database as a vault and the user as someone with the key.

Creating a Database User

  1. Go to Databases > Database Users
  2. Click + Create User
  3. Enter a username
  4. Generate or create a strong password
  5. Click Create

[SCREENSHOT: Create Database User form with username and password fields]

Assigning Privileges

After creating a user, assign them to a database:

  1. Click on the user
  2. Select Add Database
  3. Choose which database(s) they can access
  4. Set their permissions:
    • All Privileges - Full access (recommended for your application)
    • Read Only - Can view but not modify data
    • Custom - Pick specific permissions

[SCREENSHOT: Database privileges assignment screen with checkboxes for different permissions]

Common Privileges Explained

Privilege What It Does
SELECT Read data from tables
INSERT Add new data
UPDATE Modify existing data
DELETE Remove data
CREATE Make new tables
DROP Delete tables (dangerous!)
ALTER Modify table structure
INDEX Create/remove indexes

Using phpMyAdmin

phpMyAdmin is a web-based tool for managing your databases without writing SQL code.

Accessing phpMyAdmin

  1. Go to Databases in Enhance
  2. Click the phpMyAdmin button (or link)
  3. You'll be logged in automatically

Database management interface

Common phpMyAdmin Tasks

Browsing Data

  1. Click your database name on the left
  2. Click a table name
  3. Click Browse to see the data

Running SQL Queries

  1. Select your database
  2. Click the SQL tab
  3. Enter your query
  4. Click Go
-- Example: Find all posts from 2024
SELECT * FROM wp_posts WHERE post_date LIKE '2024%';

Exporting Data

  1. Select your database
  2. Click Export
  3. Choose format (SQL is most common)
  4. Click Go to download

Importing Data

  1. Select your database
  2. Click Import
  3. Choose your SQL file
  4. Click Go

[SCREENSHOT: phpMyAdmin import screen with file selection and options]

Backing Up Databases

Manual Backup via phpMyAdmin

  1. Open phpMyAdmin
  2. Select your database
  3. Click Export
  4. Choose Quick method and SQL format
  5. Click Go
  6. Save the downloaded .sql file somewhere safe

Automated Backups

Enhance can automatically backup your databases. See our Backup Guide for details.

Restoring a Database

From a Backup File

  1. Open phpMyAdmin
  2. Create a new empty database (or use existing)
  3. Select the database
  4. Click Import
  5. Choose your .sql backup file
  6. Click Go

Warning: Importing into an existing database with data will add to (not replace) the existing data unless your backup includes DROP TABLE statements.

Restoring from Enhance Backups

If you've got Enhance backups enabled:

  1. Go to Backups
  2. Find the backup you want
  3. Select Restore Database
  4. Choose which database to restore
  5. Confirm the restoration

Database Troubleshooting

"Error Establishing Database Connection"

This dreaded message usually means:

  1. Wrong credentials - Check your database name, username, and password in your website's config file (e.g., wp-config.php for WordPress)
  2. Database doesn't exist - Verify the database is created in Enhance
  3. User lacks permissions - Check the user is assigned to the database with proper privileges
  4. Database server issues - Rare, but check our status page

"Access Denied for User"

  • Verify the username and password are correct
  • Check the user has privileges on the specific database
  • Make sure you're using the correct host (usually localhost)

"Table Doesn't Exist"

  • The table may have been deleted or never created
  • Check you're connecting to the right database
  • You may need to restore from a backup

Database Running Slowly

  • Add indexes to frequently searched columns
  • Optimise tables via phpMyAdmin (Operations > Optimize table)
  • Consider upgrading your hosting plan for more resources
  • Review your queries for inefficiencies

Database Security Best Practices

  1. Strong Passwords - Use randomly generated passwords for database users
  2. Principle of Least Privilege - Only grant permissions that are actually needed
  3. Regular Backups - You can never have too many backups
  4. Keep Software Updated - Outdated CMS software is a common attack vector
  5. Don't Use 'root' - Create specific users for specific purposes

Connecting from External Applications

Need to connect to your database from outside your hosting? You'll need to enable remote database access:

  1. Go to Databases > Remote Access
  2. Add your IP address (or IP range)
  3. Save changes

The connection details:

Setting Value
Host Your server's IP or hostname
Port 3306
Database Your database name
Username Your database username
Password Your database password

Security Note: Only enable remote access if you absolutely need it, and restrict it to specific IP addresses.


Next Steps: Want to manage your domain's DNS? Check out our DNS Management Guide.

Please rate this article to help us improve our Knowledge Base.

0 0