
On this page, we will outline the steps required to install Mysql .0 on Linux.
The first step is to download the necessary packages to perform the installation.
1) List of rpm for installation
In this link we can see in detail the installation packages that are necessary to install and how to do it.
https://dev.mysql.com/doc/refman/8.rpm.html
These are the packages needed to perform the installation correctly:
oracle MySQL]$ ls -la
total 1476364
drwxr-xr-x 2 root root 4096 Jan 19 2020 .
drwxr-xr-x 7 root root 4096 Feb 3 2020 ..
-rw-r–r– 1 root root 22598996 Sep 23 2019 mysql.0.18-1.1.el7.x86_64.rpm
-rw-r–r– 1 root root 40154652 Sep 23 2019 mysql.0.18-1.1.el7.x86_64.rpm
-rw-r–r– 1 root root 623112 Sep 23 2019 mysql.0.18-1.1.el7.x86_64.rpm
-rw-r–r– 1 root root 6933028 Sep 23 2019 mysql.0.18-1.1.el7.x86_64.rpm
-rw-r–r– 1 root root 23702488 Sep 23 2019 mysql.0.18-1.1.el7.x86_64.rpm
-rw-r–r– 1 root root 3890924 Sep 23 2019 mysql.0.18-1.1.el7.x86_64.rpm
-rw-r–r– 1 root root 1377676 Sep 23 2019 mysql-compat-8.0.18-1.1.el7.x86_64.rpm
-rw-r–r– 1 root root 477137056 Sep 23 2019 mysql.0.18-1.1.el7.x86_64.rpm
-rw-r–r– 1 root root 158334820 Sep 23 2019 mysql.0.18-1.1.el7.x86_64.rpm
-rw-r–r– 1 root root 21055592 Sep 23 2019 mysql.0.18-1.1.el7.x86_64.rpm
-rw-r–r– 1 root root 69390 Oct 10 2019 README.txt
-rwxr-xr-x 1 root root 755879610 Jan 17 2020 V983832-01.zip
2) Installing RPM packages
We install the package (as root): mysql*.x86_64.rpm
oracle MySQL]$ su –
Password:
Last login: Wed May 4 15:42:35 UTC 2022
[root@edvmr1p0 ~]# cd /stage
[root@edvmr1p0 stage]# cd MySQL
[root@edvmr1p0 MySQL]# yum install mysql*.x86_64.rpm
Loaded plugins: langpacks, ulninfo
Examining mysql.0.18-1.1.el7.x86_64.rpm: mysql.0.18-1.1.el7.x86_64
Marking mysql.0.18-1.1.el7.x86_64.rpm be installed
Resolving Dependencies
–> Running transaction check
—> Package mysql.x86_64 0:8.0.18-1.1.el7 will be installed
–> Finished Dependency Resolution
ol7_MySQL80/x86_64 | 3.0 kB 00:00:00
ol7_MySQL80/x86_64/updateinfo | 71 B 00:00:00
ol7_MySQL80/x86_64/primary_db | 204 kB 00:00:00
ol7_UEKR5/x86_64 | 3.0 kB 00:00:00
ol7_UEKR5/x86_64/updateinfo | 246 kB 00:00:00
ol7_UEKR5/x86_64/primary_db | 46 MB 00:00:01
ol7_addons/x86_64 | 3.0 kB 00:00:00
ol7_addons/x86_64/updateinfo | 144 kB 00:00:00
ol7_addons/x86_64/primary_db | 231 kB 00:00:00
ol7_latest/x86_64 | 3.6 kB 00:00:00
ol7_latest/x86_64/group_gz | 136 kB 00:00:00
ol7_latest/x86_64/updateinfo | 3.4 MB 00:00:00
ol7_latest/x86_64/primary_db | 39 MB 00:00:01
ol7_optional_latest/x86_64 | 3.0 kB 00:00:00
ol7_optional_latest/x86_64/updateinfo | 1.4 MB 00:00:00
ol7_optional_latest/x86_64/primary_db | 5.7 MB 00:00:00
ol7_software_collections | 3.0 kB 00:00:00
ol7_software_collections/updateinfo | 8.9 kB 00:00:00
ol7_software_collections/primary_db | 5.9 MB 00:00:00
Installing:
mysql x86_64 8.0.18-1.1.el7mysql.0.18-1.1.el7.x86_64 8.5 M
Install 1 Package
Total size: 8.5 M
Installed size: 8.5 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql.0.18-1.1.el7.x86_64 1/1
Verifying: mysql.0.18-1.1.el7.x86_64 1/1
Installed:
mysql.x86_64 0:8.0.18-1.1.el7
Complete!
[root@edvmr1p0 MySQL]#
3) Install the rpm the following libraries ( mysql.0.x86_64.rpm, mysql.0.x86_64.rpm)
[root@edvmr1p0 MySQL]# yum install mysql.0*.x86_64.rpm
Loaded plugins: langpacks, ulninfo
Examining mysql.0.18-1.1.el7.x86_64.rpm: mysql.0.18-1.1.el7.x86_64
Marking mysql.0.18-1.1.el7.x86_64.rpm be installed
Resolving Dependencies
–> Running transaction check
—> Package mysql.x86_64 0:8.0.18-1.1.el7 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
Installing:
mysql x86_64 8.0.18-1.1.el7mysql.0.18-1.1.el7.x86_64 17 M
Install 1 Package
Total size: 17 M
Installed size: 17 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql.0.18-1.1.el7.x86_64 1/1
Verifying: mysql.0.18-1.1.el7.x86_64 1/1
Installed:
mysql.x86_64 0:8.0.18-1.1.el7
Complete!
[root@edvmr1p0 MySQL]# yum install mysql.0*.x86_64.rpm
Loaded plugins: langpacks, ulninfo
Examining mysql.0.18-1.1.el7.x86_64.rpm: mysql.0.18-1.1.el7.x86_64
Marking mysql.0.18-1.1.el7.x86_64.rpm be installed
Resolving Dependencies
–> Running transaction check
—> Package mysql.x86_64 0:8.0.18-1.1.el7 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
Installing:
mysql
x86_64 8.0.18-1.1.el7mysql.0.18-1.1.el7.x86_64 6.4 M
Install 1 Package
Total size: 6.4 M
Installed size: 6.4 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql.0.18-1.1.el7.x86_64 1/1
Verifying: mysql.0.18-1.1.el7.x86_64 1/1
Installed:
mysql.x86_64 0:8.0.18-1.1.el7
Complete!
[root@edvmr1p0 MySQL]#
3) We install the DB and its related tools:
The command for the installation are the following:
yum install mysql.0.18-1.1.el7.x86_64.rpm
[root@edvmr1p0 MySQL]# yum install mysql.0.18-1.1.el7.x86_64.rpm
Loaded plugins: langpacks, ulninfo
Examining mysql.0.18-1.1.el7.x86_64.rpm: mysql.0.18-1.1.el7.x86_64
Marking mysql.0.18-1.1.el7.x86_64.rpm be installed
Resolving Dependencies
–> Running transaction check
—> Package mysql.x86_64 0:8.0.18-1.1.el7 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
Installing:
mysql x86_64 8.0.18-1.1.el7mysql.0.18-1.1.el7.x86_64 177 M
Install 1 Package
Total size: 177 M
Installed size: 177 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql.0.18-1.1.el7.x86_64 1/1
Verifying: mysql.0.18-1.1.el7.x86_64 1/1
Installed:
mysql.x86_64 0:8.0.18-1.1.el7
Complete!
yum install mysql.0.18-1.1.el7.x86_64.rpm
[root@edvmr1p0 MySQL]# yum install mysql.0.18-1.1.el7.x86_64.rpm
Loaded plugins: langpacks, ulninfo
Examining mysql.0.18-1.1.el7.x86_64.rpm: mysql.0.18-1.1.el7.x86_64
Marking mysql.0.18-1.1.el7.x86_64.rpm be installed
Resolving Dependencies
–> Running transaction check
—> Package mysql.x86_64 0:8.0.18-1.1.el7 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
Installing:
mysql x86_64 8.0.18-1.1.el7mysql.0.18-1.1.el7.x86_64 2.0 G
Install 1 Package
Total size: 2.0 G
Installed size: 2.0 G
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql.0.18-1.1.el7.x86_64 1/1
Verifying: mysql.0.18-1.1.el7.x86_64 1/1
nstalled:
mysql.x86_64 0:8.0.18-1.1.el7
Complete!
[root@edvmr1p0 MySQL]#
4) We start the Mysql service.
At this point, the installation is complete, and it is time to start the Mysql services so that they can be used.
The procedure is as follows:
systemctl start mysqld.service
systemctl enable mysqld
systemctl status mysqld
root@edvmr1p0 MySQL]# systemctl start mysqld.service
[root@edvmr1p0 MySQL]# systemctl enable mysqld
[root@edvmr1p0 MySQL]# systemctl status mysqld
● mysqld.service – MySQL
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2022-05-06 09:17:26 UTC; 6min ago
Docs: man:mysqld(8)
mysql
Main PID: 3350 (mysqld)
Status: "Server is operational"
CGroup: /system.slice/mysqld.service
└─3350 /usr/sbin/mysqld
May 06 09:17:17 edvmr1p0 systemd[1]: Starting MySQL
May 06 09:17:26 edvmr1p0 systemd[1]: Started MySQL .
5) We connect to Mysql for the first time Mysql change the password:
5.1) We look for the password that is generated randomly during the installation, in the following route and in the following form:
[root@edvmr1p0 log]# grep ‘temporary password’ /var/log/mysqld.log
2022-05-06T09:17:22.280953Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: <so*cUqfy0ka
5.2) We connect to the DB.
[root@edvmr1p0 log]# mysql root -p
Enter password:
Welcome to the MySQL . Commands end with ; or \g.
Your MySQL id is 14
Server version: 8.0.18-commercial
Copyright (c) 2000, 2019, Oracle its affiliates. All rights reserved.
Oracle a registered trademark of Oracle and/or its
affiliates. Other names may be trademarks of their respective
owners
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
5.3) Change the temporary password
mysql> alter user user ()
-> identified by '***';
Query OK, 0 rows affected (0.00 sec)
6) We verify that we can access correctly, with the new password entered previously.
root@edvmr1p0 log]# mysql root -p
Enter password:
Welcome to the MySQL . Commands end with ; or \g.
Your MySQL id is 19
Server version: 8.0.18-commercial MySQL Server – Commercial
Copyright (c) 2000, 2019, Oracle its affiliates. All rights reserved.
Oracle a registered trademark of Oracle and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>
7) We create a user that will be the one to perform the tests.
mysql> CREATE USER 'rootphp'@'loclahost' IDENTIFIED WITH
-> mysql by '***';
Query OK, 0 rows affected (0.01 sec)
We give it the necessary permissions. In this case we are going to give it full control over the database.
mysql> GRANT ALL on . to 'rootphp'@'loclahost';
Query OK, 0 rows affected (0.01 sec)
We have detailed the steps necessary to perform a simple installation of Mysql. This is a basic installation, so it is advisable to review the documentation to perform the most suitable configuration according to the specifications of your architecture, especially if it is not a test environment.






