I just installed MySQL on a fresh installation of Linux CentOS, but when mysql-server finished installing and I enter "systemctl start mysqld" it says:
"Job for mysqld.service failed because the control process exited with error code."
systemctl status mysqld.service -l
I have tried installing removing and installing mysql a few times, tried installing on another new VM but I get the same issues. Tried as both user with sudo and as root without success.
When entering "systemctl status mysqld" I get the information in the picture below. I find no information in there that helps me. Tried checking "journalctl -xe" and in the log (/var/log/mysqld.log) but nothing seems to lead me to a fix when googling what I find there.
In the log it says several ERRORS. Like "Table ‘mysql.user’ doesn’t exist" and "priviliege system failed to initialize correctly….upgrade MySQL to a new version..". Tried looking for threads with these same error-codes but with no luck.
Anyone have any ideas on what I’m missing?
2
Answers
After several hours of searching for potential answers online without success, I instead tried installing a VM with another image of Centos 7 and also with an image of Centos 9 in virtualbox, and then installing mysql with the same procedure as you mention and then it worked without any issues.
The version that was used when the problems occurred was: 'CentOS-7.0-1406-x86_64-DVD.iso'
Using the latest Centos 7 and/or Centos 9 Stream iso from the official website seems to give better results with installing MySQL..
Installation of mysql on centos7 is pretty straight forward .
one way is to follow below steps:
wget http://repo.mysql.com/mysql80-community-release-el7.rpm
sudo rpm -ivh mysql80-community-release-el7.rpm
sudo yum install mysql-server
sudo systemctl start mysqld
sudo systemctl status mysqld
sudo mysql_secure_installation