I've installed mysql 8 on centos 7

and when i want to start the mysqld service , it says :

Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details

and when i run systemctl status mysqld.service it says:

mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor 
preset: disabled)
Active: failed (Result: exit-code) since Mon 2020-01-13 06:01:53 EST; 6min ago
Docs: man:mysqld(8)
Process: 5532 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 5504 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 5532 (code=exited, status=1/FAILURE)
Status: "Data Dictionary upgrade from MySQL 5.7 in progress"

Jan 13 06:01:48 server1.lifeandme.net systemd[1]: Starting MySQL Server...
Jan 13 06:01:53 server1.lifeandme.net systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE
Jan 13 06:01:53 server1.lifeandme.net systemd[1]: Failed to start MySQL Server.
Jan 13 06:01:53 server1.lifeandme.net systemd[1]: Unit mysqld.service entered failed state.
Jan 13 06:01:53 server1.lifeandme.net systemd[1]: mysqld.service failed.

I also tried restart the service and cleaning log files under /var/lib/mysql , but no success

i did the following commands to install lamp on server (history related to lamp installation)

yum install httpd

systemctl start httpd.service

systemctl enable httpd.service

yum install mariadb-server mariadb

systemctl start mariadb


systemctl enable mariadb.service

yum install php php-mysql

systemctl restart httpd.service

yum remove php php-server

yum clean packages

yum install epel-release

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

yum install yum-utils

yum-config-manager --enable remi-php72

yum install php72

yum remove mariadb mariadb-server

systemctl restart httpd.service

yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

yum install mysql-community-server

systemctl enable mysqld

systemctl start mysqld =>  ran to error
  • You were upgrading from 5.7 to 8.0? Did you run mysql_upgrade?
    – Rick James
    Commented Jan 16, 2020 at 6:09
  • @RickJames yes , no i didn't use mysql_upgrade i added the commands that i ran under my question
    – Ali_Hr
    Commented Jan 16, 2020 at 6:51
  • @RickJames result after i did mysql_upgrade on terminal is as follow: The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are now done by the server. To upgrade, please start the new MySQL binary with the older data directory. Rep airing user tables is done automatically. Restart is not required after upgrade.
    – Ali_Hr
    Commented Jan 16, 2020 at 14:59
  • 2. The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to ru n the server upgrade sequence on demand. It may be possible that the server upgrade fails due to a number of reasons.
    – Ali_Hr
    Commented Jan 16, 2020 at 15:02
  • 3. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the -- upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.
    – Ali_Hr
    Commented Jan 16, 2020 at 15:03

1 Answer 1


This worked for me:

Clear the mysql data directory at /var/lib/mysql assuming that you have backups or you don't really need that data anymore.

Then sudo service mysqld start

  • The only solution that worked for me after hours of trials. Thank you.
    – TeeKea
    Commented Nov 26, 2020 at 19:35
  • 1
    And if i need the data? Commented Apr 25, 2021 at 8:14
  • then you can restore from backups after the upgrade Commented Aug 31, 2021 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.