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.
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.
Already tried. its not working for me
[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: 18.104.22.168)
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: 22.214.171.124)
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: 126.96.36.199)
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.
Package Arch Version Repository Size
community-mysql-server x86_64 8.0.28-1.fc36 fedora 17 M
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
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
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
You have installed
(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
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