MySQL is one of the open-source RDBMS (Relational DataBase Management System) software which is included in the top 3 most popular and most widely used worldwide. Currently, the most recent version of MySQL is MySQL 8, with a minor version 8.0.18 as of this writing. I will share information about how to install MySQL 8 on Linux (CentOS 7 and Ubuntu). Alright, let’s get started :
Install MySQL 8 on CentOS 7 ¶
- Download MySQL 8 package on CentOS 7
wget https://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm
- install MySQL 8 package with yum
yum localinstall mysql80-community-release-el7-1.noarch.rpm
Install MySQL 8 on Ubuntu ¶
- Download MySQL 8 repository
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.11-1_all.deb
- Install the downloaded repository
sudo dpkg -i mysql-apt-config_0.8.11-1_all.deb
- updates your repository
sudo apt-get update
- Install MySQL 8
sudo apt-get install mysql-server
MySQL Preparation 8 after Installation ¶
After installing MySQL 8, you can perform the initial configuration by running the command :
sudo mysql_secure_installation
After the command is executed, the system will ask you to create a password for the root user, before entering the password, you will be asked to determine the strength level of your password, consisting of 3 levels: LOW, MEDIUM, STRONG. For the explanation :
- LOW : password must have at least 8 characters
- MEDIUM : password must have at least 8 characters along with 1 uppercase letter, 1 lowercase letter, 1 number and 1 special character
- HARD : password must have a minimum of 8 characters along with 1 uppercase letter, 1 lowercase letter, 1 number and 1 special character and will also be checked in the dictionary file (the dictionary file referred to here is a list of passwords that are vulnerable to use).
If you have created a password, system will then ask you to configure several options, including :
- Remove anonymous users?
- Disallow root login remotely?
- Delete the test database and access to it?
- Reload privilege table now?
The system will suggest you to configure everything by typing Y or you can set it up as needed.
Running MySQL 8 Service ¶
To use mysql, you need to run the service, run the following command :
sudo systemctl start mysql
sudo systemctl enable mysql
then, try to enter the mysql console with this command :
sudo mysql -u root -p
You will be asked to enter your root password.
Well, that’s a bit of my writing on How to Install MySQL 8 on Linux (CentOS 7 and Ubuntu) starting from installation, initial configuration, to accessing it. Thanks for reading 😀
0 Comments