How to create a database and a database user

DirectAdmin

  1. Go to your client area to the “Services – My Services” section and click the “Open DirectAdmin” button;
  2. The DirectAdmin panel will be opened. Go to the “Account Manager” section and click the “MySQL Management” button;
  3. Click the “Create New Database” button (you can see how many databases you can create within your plan if you move your cursor over this button);
  4. A new window will be opened. Here you have to specify:
    • Database Name (up to 55 Latin letters);
    • Database User (it is equal to Database Name by default, you have to deactivate the appropriate checkbox if you want to change it);
    • Database Password (the button with dices allows you to generate a random password, the button with an eye allows you to unhide your password symbols);
  5. Specify the necessary data and click the “Create Database” button;
  6. Once the database is created, a new window displaying your database parameters will appear. Copy this data to your site’s configuration file or to a safe place and close this window. Done.

You can upload a backup of your base to the created database (with the “Upload Backup” button) or download your database backup to your PC (with the “Download” button in front of each database) in this section as well.

To delete the database, hit the checkbox near the needed database and click the “Delete” button.

cPanel

  1. Go to your client area to the “Services – My Services” section and click the “Open cPanel” button;
  2. The cPanel will be opened. Go to the “Databases” section and click the “MySQL® Database” button;
  3. In the “New Database” field, type a name for the database and click the “Create Database” button;
  4. To create a MySQL User, find the sections called “MySQL Users” and “Add New User” and type a username you wish to assign to your database. Once done, choose a secure password for the MySQL User and type it into the corresponding fields. For help generating a strong password, click the “Generate Password” button;
  5. After entering the data, click the “Create User” button;
  6. Now you need to assign the MySQL User to the database and set proper privileges. To do this, find the “Add User To Database” section and make sure that you choose the correct Database and User correspondingly. Once done, simply click the “Add button”;
  7. In the next window, you will need to set the correct privileges to the MySQL User. You shall grant all privileges to be able to maintain your MySQL Database without any restrictions, so you simply need to choose the “All Privileges” option and click the “Make Changes” button.

To delete the database, navigate to the “Current Databases” section of MySQL Databases and click the “Delete” button next to the database you wish to delete.

If there is a need to change the password for a MySQL User, you can do this by clicking on the “Change password” button in the “Current users” section.

ISPmanager

  1. Go to your client area to the “Services – My Services” section and click the “Open ISPmanager” button;
  2. You can add a database by going to the section “Dashboard – Databases”;
  3. Click the “Add” button at the top of the columns on the right;
  4. Fill in the database details:
    • Name – the name of the database;
    • Encoding – we recommend choosing UTF8;
    • User – you can choose that user or create a new one;
    • Username – the name of the database user to be created;
    • Password, Confirmation – password for the created database user. Note that you can click the “Generate Password” button next to the question mark for the Password in order to have a more secure password;
    • Remote access – whether you want to open remote access to the database;
    • IP addresses – when changing this field, be sure to leave the IP address of the virtual hosting serverю Otherwise, the site will not be able to connect to the database;
  5. Upon completion of entering the data, click the “Ok” button.

Keep a record of the database name, username, and password as you’ll need those when installing scripts. The hostname is “localhost” for script installation.

Database editing is carried out by clicking on the “Edit” button.

Plesk

  1. Go to your client area to the “Services – My Services” section and click the “Open Plesk” button;
  2. The Plesk panel will be opened. Go to the “Databases” section and click the button ”Add Databases”;
  3. In the “Database name” text box, type the database name that you want to use;
  4. In the “Related site” list box, select a site to associate with the new database, or accept the default value;
  5. To create a user for the database, under “Users”, select the “Create a database user” check box;
  6. In the Database user name text box, type the username that you want to use;
  7. Click the “Generate” button and Plesk generates a random, strong password for you;
  8. To use the database user for accessing any of your databases, select “User has access to all databases within the selected subscription”;
  9. Upon completion of entering the data, click the “OK” button.

Click the “Remove Database” button in the section for the database if you want to remove a database.

Rate this article
Share this article
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
In this article