What is a Database?
A database refers to a collection of logically related information organized so that it can be easily accessible, managed, and updated. Databases are generally accessed electronically from a computer system and are usually controlled by a database management system (DBMS). The database administrator (DBA) is the individual responsible for managing the databases, including database security, access control, backup, and disaster recovery.
Components of a Database
The five major components of a database are:
1. Hardware
Hardware refers to the physical, electronic devices such as computers and hard disks that offer the interface between computers and real-world systems.
2. Software
Software is a set of programs used to manage and control the database and includes the database software, operating system, network software used to share the data with other users, and the applications used to access the data.
3. Data
Data are raw facts and information that need to be organized and processed to make it more meaningful. Database dictionaries are used to centralize, document, control, and coordinate the use of data within an organization. A database is a repository of information about a database (also called metadata).
4. Procedures
Procedures refer to the instructions used in a database management system and encompass everything from instructions to setup and install, login and logout, manage the day-to-day operations, take backups of data, and generate reports.
5. Database Access Language
Database Access Language is a language used to write commands to access, update, and delete data stored in a database. Users can write commands using Database Access Language before submitting them to the database for execution.
Through utilizing the language, users can create new databases, tables, insert data, and delete data.
In this tutorial, you will learn how to create a database from cPanel and also how to set database permissions.
Steps to create the database username and database name;
Login to your cPanel.
If this is your first time to access cPanel you can learn how to login to cPanel here
In the DATABASES section of the cPanel home screen, click MySQL
3. Under Create New Database, in the New Database text box, type the name of the database.
4. Click Create Database. cPanel creates the database.
5. When the database is created, click Go Back.
6. Under Add User to Database, in the User list box, select the user that you want to add.
7. In the Database list box, select the new database.
8. Click Add.
9. Select the check boxes to grant the user specific privileges, or select the ALL PRIVILEGES check box to grant the user all permissions to the database.
10. Click Make Changes. cPanel adds the user to the database.
11. Click on change Password and enter a new password copy it then go back to the main page on your cPanel and locate file manager under the file segment.
In this segment we will update and synchronize the database credentials we have created on MySQL Databases to our configuration file. This can be executed using the following steps;
Login to File manager
2. Open public_html and locate configuration file or config.php
3. Right click on it and click on edit to allow you edit the configuration details.
4. Enter the database name, user and password you created on MySQL Databases in between the ‘two apostrophe ‘and save.
while synchronizing the database credentials on the configuration file ensure you use the same credentials on both MySQL Databases and configuration file to avoid database error on the website.
Watch the video description below: