my computer hangs for about 5 mins. It then works sluggishly. Even rebooting the computer takes a long time. To understand the problem, I issued the command
Upon reading about this problem on some forums, I issued the command
sudo systemctl start mariadb.service
but I got the message “Failed to enable unit: Unit file mariadb.service does not exist.”
What should I do to get MySQL up and running on my system? I was using it perfectly with Fedora 30 but now, after the fresh install of Fedora 31, I can’t seem to make it work.
You did do a mysqld --initialize ? mysql just needs it own database do work succesfully. used to be a seperate command ‘mysql_install_db’ in the olden days…
After installing Fedora 31 and performing the necessary tasks to get it up and running, I tried to install MySQL. I followed https://computingforgeeks.com/how-to-install-mysql-8-on-fedora to install Mysql. However, when I issued sudo systemctl start mysqld.service, my computer just froze for about 2-3 mins and when it unfroze, it ran extremely slow. I rebooted the machine, but the boot process also seems to have been broken/affected. After boot up I issued sudo systemctl status mysqld.service but it gave me the following error:
Not only this, but my boot time has increased substantially(near about 5 mins). During the boot up process, the machine often crashes. How do I solve this issue? What is the correct method to get MySQL 8 working?
@c2ycharlie, Here are some things we have to shuffle, it happen to me too, GNOME freeze and take forever to login:
systemctl status mysqld.service, This information doesn’t explain wheel the problem, after this command you should type journalctl -xe and provide all information necessary provide by this command.
You can install a mysql from the main repo, a mysql provide by the community, it version is community-mysql-8.0.17-2.fc31 you can install just typing:
sudo dnf install community-mysql-server
Depend of your needs you can use container, like podman:
For security reasons, MySQL generates a temporary root key. Please note that MySQL has even stricter security policies than MariaDB.
Then, you have to show which is the temporary password generated to be able to run the mysql_secure_installation script and be able to set a definite root key.
sudo cat /var/log/mysqld.log
and find something like temporary password generated.
Configuring MySQL before the first use
sudo mysql_secure_installation
Then, answer the security questions as you prefer. or just yes to all of them.
using MYSQL
sudo mysql -u root -p
Removing MySQL
I suggest to remove in the following way, the most appropriate and safe way without removing many dependencies is:
Hey @hhlp, in your quick tips point number 2, you tell me to use community-mysql from fedora repos but in the install steps you are again adding the repos and using mysql-community-server. Why so? Moreover, the install process listed by you is the exact process which I followed which caused the freeze. Could you please look into it? Thanking you in anticipation.
the proper way is start the service and see what journalctl -xe say about it, systemctl status doesn’t provide much help here, is your system doesn’t freeze like me, reboot doesn’t help too, I have to recover from a LIVE/CD…
@hhlp@alciregi thank you both for your continuous support and guidance. I tried to run sudo dnf install community-mysql-server. It ran perfectly. However, when I tried to run sudo systemctl start mysqld.service, it failed again, although the system didn’t crash like previous time. Tired of it all, I have decided to switch to MariaDB. Installed it just a few hours ago, seems to be working fine.
@hhlp Thank you so much man! Thanks a ton! Your solution worked. Even when I had given up hope, you kept helping me and the result was worth it. Once again man, thank you a lot!