How to Create a MySQL Database

Published 8 June 2026 · By Host Havoc Technical Support Team

cPanel includes a MySQL Database Wizard that walks you through creating a database and a database user in one flow. Once created, you can connect to the database from your web application or enable remote MySQL connections if an external application needs access.

Creating a database with the wizard

  1. Log in to the cPanel control panel.
  2. Under the Databases section, click MySQL Database Wizard.
  3. Enter a name for your database and click Next Step.
  4. Create a database user by entering a username and a strong password. If you choose to generate a password, copy it somewhere safe before continuing.
  5. Assign the new user to the database by selecting the appropriate privileges, then click Next Step.
  6. The wizard confirms the database and user have been created.

Note: Your database name and username are automatically prefixed with your cPanel account identifier followed by an underscore (for example, accountname_dbname). This is normal and expected.

Connection details

SettingValue
Hostlocalhost (for scripts on the same server)
Port3306
DatabaseYour full database name (with prefix)
UsernameYour full database username (with prefix)

Tip: Most CMS installers such as Softaculous create the database for you automatically. Use the manual wizard when you need a blank database for a custom application.

Troubleshooting

Access denied from an external host: By default, MySQL only accepts connections from the same server. To allow a remote application or tool to connect, see Enabling Remote MySQL Connections.