How to create a MySQL database and user

Many websites and apps, such as WordPress, store their content in a database. If you are installing software by hand, you will need to create a database and a user that can access it. cPanel has a wizard that walks you through this.

Steps

If your cPanel uses the Jupiter theme

  1. Log in to cPanel and open Databases > Database Wizard.
  2. In New Database, type a name and click Next Step. cPanel adds your account name in front of it.
  3. In Username, enter a name for the database user and type a strong password. Click Create User.
  4. On the privileges page, tick All Privileges and click Next Step.
  5. Write down the full database name, the full database username, and the password. Your application will ask for them.

If your cPanel uses the Meridian theme

  1. Log in to cPanel and click Databases in the left sidebar.
  2. Click Create Database (you may also see + Create database).
  3. If you are asked for a database type, choose MySQL or MariaDB.
  4. Enter a Database name. cPanel may add your account name in front of it.
  5. Enter a username and a strong password for the database's first user.
  6. Set the user's privileges. For a typical website, choose All Privileges.
  7. When the wizard finishes, it shows the connection details (host, port, and database name) and the password. Write them down now. Meridian will not show the password again.

Good to know

A database is like a very organised filing cabinet for your website. Most clients never create one by hand, because tools such as WP Toolkit do it automatically. You only need this article when you are installing software manually, or when a developer asks you for a database for a new application. Keep the database name, user, and password somewhere safe and share them only with people you trust.

Tips and troubleshooting

  • The database host is normally localhost. If your server uses a separate database host, it is shown in Databases > Manage My Databases.
  • Database names and usernames include your account prefix, for example youraccount_wpdb. Use the full name in your app.
  • Do not create databases or users inside phpMyAdmin. They will not show up properly in cPanel, and backups may not work.
  • Use a different password for each database user.
  • To change a database user's password later, open Databases > Manage My Databases and find the user.
  • To delete a database or user, use the same page. Deleting is permanent.

Need help? Contact Barrett IT Support at support@barrettit.com or call 888.374.4632.

  • 0 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

How to use phpMyAdmin to view and edit your database

phpMyAdmin is a tool for looking inside your databases. Most clients never need it, but support...

How to export and import a database with phpMyAdmin

Exporting a database gives you a copy of its contents as a single file. You can keep it as a...