[RESPONDED] Can't install MySQL on Fedora

I know this isn’t a Framework hardware issue but I can’t post in askfedora, so please someone help me. I had followed a tutorial on installing LEMP stack, but it had me install MariaDB instead of MySQL. So I tried dnf removing it and installing MySQL but i keep getting gpg error when I do dnf update.

I tried downloading the rpm and installing that way, and it’s not working but I don’t know why. Can someone please help me? Is there a way to undo what I’ve done so I can just start over? So frustrated.

MariaDB generally can be used in place of MySQL. Unless you know that you have a specific need for MySQL, I’d just go with MariaDB.

1 Like

For questions that are clearly Fedora, the fedora reddit might be a good (better even?) alternative forum.

Searching for mysql there led me to this post, which (in addition to repeating the point that mariadb has for many users subsumed OG MySQL) also points to community-mysql in the regular Fedora repos, so it should be a more “go with the flow” way to install it instead of adding a new repository.

Command line:

$ dnf list community-mysql*
Last metadata expiration check: 0:03:47 ago on Mon 18 Dec 2023 07:15:15 PM PST.
Available Packages
community-mysql.x86_64                                                                                          8.0.35-1.fc39                                                                                   updates
community-mysql-common.i686                                                                                     8.0.35-1.fc39                                                                                   updates
community-mysql-common.x86_64                                                                                   8.0.35-1.fc39                                                                                   updates
community-mysql-devel.i686                                                                                      8.0.35-1.fc39                                                                                   updates
community-mysql-devel.x86_64                                                                                    8.0.35-1.fc39                                                                                   updates
community-mysql-errmsg.x86_64                                                                                   8.0.35-1.fc39                                                                                   updates
community-mysql-libs.i686                                                                                       8.0.35-1.fc39                                                                                   updates
community-mysql-libs.x86_64                                                                                     8.0.35-1.fc39                                                                                   updates
community-mysql-server.x86_64                                                                                   8.0.35-1.fc39                                                                                   updates
community-mysql-test.x86_64                                                                                     8.0.35-1.fc39                                                                                   updates
$ dnf info community-mysql-server
Last metadata expiration check: 0:09:03 ago on Mon 18 Dec 2023 07:15:15 PM PST.
Available Packages
Name         : community-mysql-server
Version      : 8.0.35
Release      : 1.fc39
Architecture : x86_64
Size         : 17 M
Source       : community-mysql-8.0.35-1.fc39.src.rpm
Repository   : updates
Summary      : The MySQL server and related files
URL          : http://www.mysql.com
License      : GPL-2.0-or-later AND LGPL-2.1-only AND BSL-1.0 AND GPL-1.0-or-later OR Artistic-1.0-Perl AND BSD-2-Clause
Description  : MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
             : client/server implementation consisting of a server daemon (mysqld)
             : and many different client programs and libraries. This package contains
             : the MySQL server and some accompanying files and directories.
$ sudo dnf install community-mysql-server
Place your right index finger on the fingerprint reader
Last metadata expiration check: 0:00:25 ago on Mon 18 Dec 2023 07:18:52 PM PST.
Dependencies resolved.
=======================================================================================================================================================================================================================
 Package                                                       Architecture                                  Version                                              Repository                                      Size
=======================================================================================================================================================================================================================
Installing:
 community-mysql-server                                        x86_64                                        8.0.35-1.fc39                                        updates                                         17 M
Installing dependencies:
 community-mysql                                               x86_64                                        8.0.35-1.fc39                                        updates                                        3.1 M
 community-mysql-common                                        x86_64                                        8.0.35-1.fc39                                        updates                                         76 k
 community-mysql-errmsg                                        x86_64                                        8.0.35-1.fc39                                        updates                                        504 k
 mecab                                                         x86_64                                        0.996-5.fc39                                         fedora                                         356 k
 mysql-selinux                                                 noarch                                        1.0.10-1.fc39                                        updates                                         35 k
 protobuf-lite                                                 x86_64                                        3.19.6-6.fc39                                        fedora                                         258 k

Transaction Summary
=======================================================================================================================================================================================================================
Install  7 Packages

Total download size: 21 M
Installed size: 179 M
Is this ok [y/N]: 
1 Like

Ok, so I got to the point where I could not install either of them, and tried looking at those posts but they didn’t help. I learned about a nifty tool sudo dnf history --reverse and sudo dnf history rollback {number to rollback to} Now I SHOULD be able to start over like I never installed anything. I guess I’ll try again wtih mariaDB.

The document is here.

1 Like

@Melanie_Carr also post the history of commands you used or the turtorial you followed, that would also help narrow down the issue. Also while instralling some things form the software center is okay others don’t work so well, i.e. services you might be trying to run such as mysql, apache, nginx, postgresql etc. these are often better served by installing it in a terminal as Software Center essentially hides what it is doing. While this is something you might be used to with MacOS this is not the best way to do things in Linux.

Hi @Melanie_Carr, as @junaruga indicated, this is going to be where you want to be for the proper doc to get this sorted.

Fedora docs are outstanding in providing a clear path forward and should get this resolved for you. :slight_smile: