Step 1. Introduction and general considerations

 

To begin my first advice is to choose a meaningful, unique name for your database, it will be easier to identify it among others later on. The database name must be unique within a MySQL server instance. Using a database name that already exists will issue an error.

A database must have at least one user account associated with it. Otherwise, it will be impossible to access the database.

All those operations are usually  processed using the administration console included in  your web hosting plan.
The most common admin interfaces are Plesk and CPanel, you will find hereby information on how to proceed for both of them.

 

Step 2.  Create a database using Plesk

 

Login to your host provider and click on the Add Database button

 

In the next page provide the requested information about the database name and the associated site.  (You may have more than one domain / sub-domain in your hosting plan)

You can create a database user while creating a database  selecting the Create a database user checkbox.
Selecting the User has access to all databases within the selected subscription  checkbox will give access any of your databases to the database user.    Choose “Allow local connections only” as Access control option, normally you don’t need to connect remotely to a MySql database and local connection are much more safe.

For more information, see Database User Accounts page on the Plesk documentation website.

 

 

 

Step 3.  Create a database using CPanel

Type a database name In the New Database text box.
Usually the hosting provider force the use of database prefixing that is automatically prepended to the database name.

Now just click on the “Create Database” button.  Done.
Click “Go Back“. The new database name appears in the list of Databases.  Scroll down the page until the  Users section

Add a MySQL user

Your new database has been created, now you must add users to the database and configure their rights.
Note : the database user has nothing to do with your email account or hosting administrative username and password. A database must have at least one user account associated with it otherwise it will simply not not work!

Now enter a username in the Username text box.
Enter a password, some providers may require a minimum password strength and the presence of a number of special characters.
To avoid any hassle you can also use the “Password Generator” button to generate a strong password.
(the stronger the better !!)

Add a user to a database

To add a user to a database, perform the following steps:

  1. Select an existing user from the dropdown list
    Select a database from the dropdown list
    Click Add. The MySQL Manage User Privileges interface will appear.Select the checkboxes that correspond to the privileges that you wish to grant to the user.Note: To grant all of the available privileges to the user, select the ALL PRIVILEGES checkbox.Click on “Make Changes” button.
    Click on  “Go Back” button to return to the main database page.

  1. In the Add User To Database section of the interface, select the desired user and database from the menus.
  2. Click Add. The MySQL Account Maintenance interface will appear.
  3. Select the checkboxes that correspond to the privileges that you wish to grant to the user.
    Note: To grant all of the available privileges to the user, select the ALL PRIVILEGES checkbox.
  4. Click Make Changes.
  5. Click Go Back to return to the main interface.

Et voilà !  You have just successfully created a new database and added a user!

If you want to use and associate the brand new database with  a new WordPress instance you might be interested to this tutorial :
WordPress Installation in 5 easy steps