Mysql Installation

Hi,

I am trying install mysql on my freshly installed Fedora 36 workstation.

I am following this guide: How to install or uninstall "community-mysql.x86_64" on Fedora 36 ?

I have finished following all guides and now need to test mysql in terminal. I tried to check mysql -v and go this error

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Here is the complete screenshot

I also followed other guides like this one: https://computingforgeeks.com/how-to-install-mysql-8-on-fedora/

But nothing works for me except above guide mentioned in question.

Any kind of help would be appriciated.
Thanks

Can you run sudo systemctl daemon-reload and sudo systemctl start mysqld?

Ran both commands, This is what i get…

Failed to start mysqld.service: Unit mysqld.service not found.

try to follow this guide Installing MySQL/MariaDB :: Fedora Docs

1 Like

Already tried. its not working for me :frowning:

[mansoor@fedora ~]$ sudo dnf install mysql-community-server
MySQL 8.0 Community Server                      3.8  B/s |  10  B     00:02    
Errors during downloading metadata for repository 'mysql80-community':
  - Status code: 404 for http://repo.mysql.com/yum/mysql-8.0-community/fc/36/x86_64/repodata/repomd.xml (IP: 184.50.20.242)
Error: Failed to download metadata for repo 'mysql80-community': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
MySQL Connectors Community                      3.6  B/s |  10  B     00:02    
Errors during downloading metadata for repository 'mysql-connectors-community':
  - Status code: 404 for http://repo.mysql.com/yum/mysql-connectors-community/fc/36/x86_64/repodata/repomd.xml (IP: 184.50.20.242)
Error: Failed to download metadata for repo 'mysql-connectors-community': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
MySQL Tools Community                                                                                                                   2.4  B/s |  10  B     00:04    
Errors during downloading metadata for repository 'mysql-tools-community':
  - Status code: 404 for http://repo.mysql.com/yum/mysql-tools-community/fc/36/x86_64/repodata/repomd.xml (IP: 184.50.20.242)
Error: Failed to download metadata for repo 'mysql-tools-community': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: mysql80-community, mysql-connectors-community, mysql-tools-community
Last metadata expiration check: 3:50:30 ago on Fri 03 Jun 2022 08:36:05 AM PKT.
No match for argument: mysql-community-server
Error: Unable to find a match: mysql-community-server

sudo dnf in community-mysql-server
Last metadata expiration check: 2:43:33 ago on Fri 03 Jun 2022 15:35:52.
Dependencies resolved.

Package Arch Version Repository Size

Installing:
community-mysql-server x86_64 8.0.28-1.fc36 fedora 17 M
Installing dependencies:
community-mysql x86_64 8.0.28-1.fc36 fedora 3.0 M
community-mysql-common x86_64 8.0.28-1.fc36 fedora 70 k
community-mysql-errmsg x86_64 8.0.28-1.fc36 fedora 469 k
mecab x86_64 0.996-3.fc36.3 fedora 346 k
mysql-selinux noarch 1.0.4-4.fc36 fedora 35 k

Transaction Summary

Install 6 Packages

Total download size: 21 M
Installed size: 175 M
Unistall repos from 'mysql80-community’and pull from fedora repo community-mysql-server

1 Like

Hi,

have you tried the Offical Fedora Doc: Installing MySQL/MariaDB :: Fedora Docs ?

Because MySQL is a Module in Fedora.

sudo dnf module install mysql

In the official guide (Installing MySQL/MariaDB :: Fedora Docs) it is
sudo dnf install mysql-community-server
But
You have installed

community-mysql-server

(community world place have changed)
So I want to ask its name changed or what?

Whatsoever it is but on writing

sudo dnf in community-mysql-server

it worked for me
After that i followed the steps given in the guide

Thanks for help

Hi @mansoorkhan

First, install community mysql server with

sudo dnf install community-mysql-server

then start mysqld service

sudo systemctl start mysqld.service

NOTE: Check the sudo mysql_secure_installation for security

Good luck