How to create a database and a database user
DirectAdmin
- Go to your client area to the “Services – My Services” section and click the “Open DirectAdmin” button;
- The DirectAdmin panel will be opened. Go to the “Account Manager” section and click the “MySQL Management” button;
- 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);
- 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);
- Specify the necessary data and click the “Create Database” button;
- 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
- Go to your client area to the “Services – My Services” section and click the “Open cPanel” button;
- The cPanel will be opened. Go to the “Databases” section and click the “MySQL® Database” button;
- In the “New Database” field, type a name for the database and click the “Create Database” button;
- 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;
- After entering the data, click the “Create User” button;
- 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”;
- 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
- Go to your client area to the “Services – My Services” section and click the “Open ISPmanager” button;
- You can add a database by going to the section “Dashboard – Databases”;
- Click the “Add” button at the top of the columns on the right;
- 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;
- 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
- Go to your client area to the “Services – My Services” section and click the “Open Plesk” button;
- The Plesk panel will be opened. Go to the “Databases” section and click the button ”Add Databases”;
- In the “Database name” text box, type the database name that you want to use;
- In the “Related site” list box, select a site to associate with the new database, or accept the default value;
- To create a user for the database, under “Users”, select the “Create a database user” check box;
- In the Database user name text box, type the username that you want to use;
- Click the “Generate” button and Plesk generates a random, strong password for you;
- To use the database user for accessing any of your databases, select “User has access to all databases within the selected subscription”;
- 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.