How to Install the official MySQL community server on Fedora 28
Today I talk about how you can install the official MySQL community server on Fedora 28.
Why you cant just use DNF to install mysql-server
In the last couple versions of Fedora the default MySQL distribution was changed to mariadb. While this is, for the most part, a drop in replacement this means you don’t get the MySQL community server by default. When you enter dnf install mysql-server
It will install mariadb.
However in this case I wanted to install the official MySQL community server.
Installing the MySQL Fedora repository RPM
To install the MySQL community server first I needed to install the Fedora repository RPM.
This can be downloaded from the MySQL website:
https://dev.mysql.com/downloads/repo/yum/
Once the appropriate RPM file has been downloaded it can be installed with rpm -Uhv mysql80-community-release-el7-1.noarch.rpm
.
This command then installs the repository that allows you to download the MySQL community server.
Once installed you can run the following command to install the official MySQL community server.
sudo dnf install community-mysql-server
Important post-installation steps
Once you have installed the MySQL server there are an important few steps to perform.
To start the server and ensure its started every boot run the following two commands.
sudo systemctl start mysqld sudo systemctl enable mysqld
Once this is done you need to finally make sure MySQL is secure. This is performed by running the sudo mysql_secure_installation
command.
Once this is complete you have finalized installing the official community MySQL server.