Creating MySQL Databases and Users Print

  • 0

Creating MySQL Databases and Users

Databases offer a way of managing large amounts of information over the web easily. They are essential for running many web-based applications, such as online retail shops, content management systems, and bulletin boards.

In this article, we will go over the steps to create a new database and a new user that will be assigned to the database successfully. When you’re setting up an application or script from scratch, this is typically required. We recommend using the Softaculous Auto-Installers when possible, as they can set up applications like Magento, Joomla, and WordPress for you.

Creating a New Database and User

Log into cPanel: Start the process by logging into your account on cPanel. After you’re logged in, go to the Databases tab and search for the MySQL Database Wizard.

  1022

  1. Create the Database: Once you have accessed this tool, follow the steps provided. The first step is to create the name of the database. Your cPanel username will prefix the database name (e.g., cpaneluser_db). To avoid confusion in the future, use a descriptive name, such as “wordpress” or “wp,” instead of something generic like “DB.”

  2. Set Database User Credentials: You will be prompted to enter your database username and password on the next page. It’s easiest to create the database user with the same username as the database name. You can use the built-in Password Generator for a secure password or type in your own choice. Once you’re satisfied with the username and password, click on the Create User button to proceed.

  933

    3.Assign User Privileges: For the database you just created, you will need to assign the user. Most of the time, you will want to grant all privileges to the user, so tick the box next to the phrase “All Privileges.” Click on the Next Step button to complete this process. Congratulations! You’ve successfully created your database and user for your cPanel account.

  1108

Deleting a MySQL Database

If you need to delete a MySQL database, go to MySQL Databases and locate the Current Databases section. In the Actions column, click on the Delete link next to the database you wish to remove. To confirm the action and permanently delete the database, simply follow the prompts.

Deleting a Database User

To delete a database user, navigate to MySQL Databases and find the Current Users section. Look for the database user you want to delete, then click on the delete icon next to their username. To confirm the deletion, click on the Delete User icon.


Was this answer helpful?

« Back