Back to Knowledge Base
Knowledge Base Hosting & Domains How to Create a MySQL Database

How to Create a MySQL Database

Hosting & Domains Apr 11, 2026
Most dynamic websites and content management systems require a MySQL database to store content, user data, and settings. This guide shows you how to create a database through your control panel.

Step 1: Access Database Management

1. Log in to your control panel.
2. Navigate to the "Databases" or "MySQL Databases" section.

Step 2: Create the Database

1. Enter a name for your new database. Choose something descriptive (e.g., "wordpress" or "mysite").
2. Click "Create Database."
3. The database will be created and appear in your database list.

Step 3: Create a Database User

A database user is required to connect to the database. For security, never use the root database account for your applications.

1. In the same database management section, find "Add New User" or "Create User."
2. Enter a username and a strong password.
3. Click "Create User."

Tip: Use a password generator to create a strong, random password. Store it securely.

Step 4: Assign User to Database

1. Find the "Add User to Database" section.
2. Select the user you just created.
3. Select the database you just created.
4. Click "Add" or "Assign."
5. When prompted for privileges, select "All Privileges" for full access, or choose specific permissions based on your needs.
6. Click "Make Changes" or "Save."

Connection Details

To connect your application to the database, you will need:

- Database Host: localhost (or 127.0.0.1)
- Database Name: The name you created (may include a prefix)
- Database User: The username you created
- Database Password: The password you set
- Port: 3306 (default)

For WordPress, enter these details in the wp-config.php file during installation.

Managing Your Database

Use phpMyAdmin to manage your database through a web interface. From your control panel, click "phpMyAdmin" to:

- Browse and edit table data
- Run SQL queries
- Import and export databases
- Optimize and repair tables
Was this article helpful?