Database is considered as one of the basic concepts in the world of information technology and is used in various fields such as web and application development. The information stored in the database is managed through the Database Management System (DBMS). One of the most popular DBMSs is MySQL. In this article, you will learn How to Install and Connect MySQL 8 on Fedora 36. You can visit Eldernode website and choose your desired package to purchase Linux VPS server.
Table of Contents
What is MySQL?
MySQL is one of the most popular open source database management systems, first launched in 1995. MySQL can run on various operating systems such as Linux, Windows, Unix and other systems to define and manage your metadata. You can install it on your local system or on a server. In the continuation of this article from the Fedora tutorial series, we intend to teach you step by step How to Install MySQL 8 on Fedora 36.
How to Install MySQL 8 on Fedora 36
Before starting the installation, run the following command to update your repositories:
sudo dnf update
To install MySQL, run the following command:
sudo dnf install community-mysql-server -y
After installation, check status of the MySQL with the following command:
systemctl status mysqld
Then start the MySQL service using the command below:
sudo systemctl start mysqld
Now run the following command to check that MySQL setup is successful:
systemctl status mysqld
To setup MySQL at each boot, use the command below:
sudo systemctl enable mysqld
To secure MySQL, use a safe script. For this purpose, use the following command:
sudo mysql_secure_installation
If you are asked for a password, run the following command to retrieve a temporary password:
sudo grep 'temporary password' /var/log/mysqld.log
How to Connect MySQL 8 on Fedora 36
Run the following command to connect MySQL:
sudo mysql -u root -p
After connecting to the MySQL, browse databases with the following command:
mysql> SHOW DATABASES;
Note: You can update MySQL in Fedora using the command below:
sudo dnf update mysql-server
Conclusion
This is how you get acquainted with MySQL, one of the most popular open source DBMSs. We also checked that this software can be run on a variety of operating systems such as Linux, Windows, etc. In this article, you learned How to Install and Connect MySQL 8 on Fedora 36.