Creating a new MySQL database
How to create a database and a user in cPanel and link them with the right privileges.
Most applications (WordPress, Joomla, web shops) need a database, a database user and a password. Everything is created in cPanel, and the number of databases depends on your plan.
- In cPanel open Databases → MySQL Databases.
- Under Create New Database enter a name (e.g.
shop) and click Create Database. cPanel automatically adds your account prefix, so the full name will be e.g.scyhost1_shop. - Under MySQL Users → Add New User enter a username and a strong password (use the Password Generator). Store the password somewhere safe.
- Under Add User To Database choose the user and the database and click Add.
- On the next screen tick ALL PRIVILEGES and click Make Changes.
Your application will need four values: database name, user, password and host (usually localhost).
You browse the contents of the database in phpMyAdmin, and connecting from code is described in Connecting to a database from PHP.
Was this article helpful?
Thanks for your feedback! Need help? Open a ticket.
Related articles
phpMyAdminBrowse, edit and search database tables through a web interface.Importing and exporting a databaseHow to back up a database to an .sql file and restore it on a new server.Connecting to a database from PHPA PDO and mysqli connection example using localhost, and the most common connection errors.Remote MySQL accessHow to allow connections to your database from your computer or another server using Remote MySQL.
