Install Mysql on Centos 8

Issues related to applications and software problems and general support
Post Reply
RiccardoS
Posts: 1
Joined: 2021/11/16 09:52:37

Install Mysql on Centos 8

Post by RiccardoS » 2022/04/04 10:09:37

Good morning,
my name is Riccardo, if trying to install mysql on virtualized centos 8 with virtualbox following the following mysql guide:
https://dev.mysql.com/doc/refman/8.0/en ... -repo.html
I downloaded the file https://dev.mysql.com/downloads/repo/yum/ compatible with the centos 8, I ran md5sum for the correctness of the downloaded file, I ran the command as root on the file
# chmod + x mysql80-community-release-el8-3.noarch.rpm

then I ran the command
$> sudo yum install mysql80-community-release-el8-3.noarch.rpm

output
CentOS Linux 8 - AppStream 271 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

Questions:
can you explain to me what I have to do to install this file and be able to go ahead with the installation of mysql?
thanks for your answer
Greetings
Riccardo

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Install Mysql on Centos 8

Post by TrevorH » 2022/04/04 10:40:36

CentOS Linux 8 is no longer supported and the repos have been removed. You need to move to something else. There are other rebuilds of RHEL 8, some/most listed in my signature below. Or you can move to Stream which is a rolling beta of the next point release of RHEL.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Install Mysql on Centos 8

Post by jlehtone » 2022/04/04 13:22:51

Does it have to be exactly "mysql"? There is "mariadb" too ...

There seems to be one "mysql" and two "mariadb" streams for EL8 (RHEL8 and other rebuilds of it).

Code: Select all

dnf module list mariadb
dnf module list mysql
The default mariadb stream is 10.3, but one can enable the 10.5 with:

Code: Select all

dnf module enable mariadb:10.5
Then one could do one of these:

Code: Select all

dnf module install mysql
dnf module install mariadb
to get mysql-8.0.26 or mariadb-10.5.9.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Install Mysql on Centos 8

Post by TrevorH » 2022/04/04 13:48:47

But none of what jlehtone suggests will work until you move to a supported distribution as CentOS Linux 8 is dead and buried and its yum repos have been removed.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

joseborera
Posts: 2
Joined: 2023/01/31 16:08:22

Re: Install Mysql on Centos 8

Post by joseborera » 2023/02/03 08:30:12

To install MySQL on CentOS Linux 8, follow these steps:

Use the following command in terminal to install the mysql80-community-release:

Code: Select all

sudo rpm -Uvh mysql80-community-release-el7-3.noarch.rpm
The output should indicate that the update and installation are complete.
Then, use the following command to install MySQL:

Code: Select all

sudo yum install mysql-server
This should complete the installation of MySQL on your CentOS Linux 8 system.

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Install Mysql on Centos 8

Post by jlehtone » 2023/02/03 08:51:52

joseborera wrote:
2023/02/03 08:30:12
To install MySQL on CentOS Linux 8 ...
TrevorH wrote:
2022/04/04 13:48:47
CentOS Linux 8 is dead and buried
There is no "CentOS Linux 8" any more. There is "CentOS Stream 8", but you don't want that on production system.
joseborera wrote:
2023/02/03 08:30:12

Code: Select all

sudo rpm -Uvh mysql80-community-release-el7-3.noarch.rpm
sudo yum install mysql-server
The first command installs a package that defines a third-party repository.
The second command installs packages (from that repository).

The yum can install packages from repo, file, and URL. No reason to use 'rpm'. The OP had already:

Code: Select all

sudo yum install mysql80-community-release-el8-3.noarch.rpm
Furthermore, if distro repos have mysql-8.0, then the use of third-party repo to get that same version is unnecessary.

Wait! You used "el7" version of repo. Do not install el7 packages into el8 system. That is a clear error.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Install Mysql on Centos 8

Post by TrevorH » 2023/02/03 12:25:54

I think this may be a spammer posting dredged up old rubbish. I deleted a user of the same name a couple of days ago for the same reason. We'll see if it comes back and posts more obvious spam...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply