Administrasi Sistem Jaringan ❘ Database Configuration
A. Learning Objective
Understand the basic concepts of databases
Able to manage an effective database
B. Learning Material
A database is a collection of data that is organized and stored systematically, allowing users to access, manage, and update data efficiently. Databases are used to store various types of information, such as student data, business transactions, or other information, in a structured and easily accessible form.
C. Learning Preparation
It would be beneficial to have some preparation before learning about DHCP server configuration. Some tools and materials could be useful for that, such as:
1. PC/LAPTOP
2. Internet
3. Iso file Linux Debian 11 (Server)
4. Iso file Windows 10 (Desktop)
5. PuTTY
6. VMware (for virtual machine)
D. Configuration
1. The first step we will do is install MariaDB, this can be done with the `apt install mariadb-server mariadb-client` command, which will install the MariaDB server and client packages.
2. To improve the security of your MariaDB installation, run the `mysql_secure_installation` command which will guide you through several important steps such as setting the root password, removing anonymous users, disallowing remote root login, deleting the test database, and reloading the privilege table to ensure your MariaDB server is protected from unauthorized access.
3. To start configuring MariaDB, access the MariaDB shell with the command `mysql -u root -p`, then enter the root password that was previously set. Once logged in, you can create a new database with commands like `CREATE DATABASE name_database;`, create new users, and set their access rights as needed. Then create a database to store student data with the command `CREATE DATABASE fibbina;`, then create users and set their access rights with the command `CREATE USER 'fibinnar'@'localhost' IDENTIFIED BY '123';`, `GRANT ALL PRIVILEGES ON fibbina.* TO 'fibinna'@'localhost';`, and finally run `FLUSH PRIVILEGES;` to enable the changes.
4. To verify that the database has been created, use the `SHOW DATABASES;` command to display a list of existing databases. Then, use the `USE fibbina;` command to select the database you want to use. If successful, the database name will appear next to "MariaDB" in the prompt, indicating that you are already inside the database.
5. Create the `daftar_siswa` table with a structure consisting of the ID column as the auto increment primary key, Name for the student's name, Age for the student's age, Class for the student's class, and Address for the student's address. After creating the table, use the `SHOW TABLES;` command to verify that the `daftar_siswa` table has been successfully created and is ready to be used to store student data.
6. In the next step, we will insert the data into the table that we configured earlier using the INSERT INTO table command. Enter the data according to the correct column.
E. Result of Configuration
1. To see the results of the database creation and data entry process, use the `SELECT * FROM table_name` command to display all the data contained in the table, so you can ensure that the table has been populated with the correct student data.
MariaDB database configuration has been completed, including installation, security, database and table creation, and data management, so that the database is ready to be used to store student information in an effective and structured manner.
0 Komentar