I have a CentOS 6.6, on the system there was a working Mysql and a mysql server already installed and a running mysqld service, but I needed a fresh install, so I did the whole removal through yum, and removal of the old Mysql residue files (double checked for remaining files).


[root@sputnik mysql]# yum install mysql mysql-server

Installation completes successfully without errors.

Starting Mysql service on a few different ways:

[root@sputnik mysql]# service mysqld start
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]

[root@sputnik mysql]# mysql

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

    [root@sputnik mysql]# mysqld_safe
    150127 11:44:39 mysqld_safe Logging to '/var/lib/mysql/sputnik.fadata.eu.err'.
    150127 11:44:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    150127 11:44:44 mysqld_safe mysqld from pid file /var/lib/mysql/sputnik.fadata.eu.pid ended

/var/lib/mysql/mysql.sock this file doesn't exist anywhere in the system, and through research I found that it is generated during mysqld service starting but the service refuses to start because it is missing?

/var/lib/mysql/sputnik.fadata.eu log file contains:

150127 11:36:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150127 11:36:07 [ERROR] Can't find messagefile '/usr/share/mysql/english/errmsg.sys'
/usr/libexec/mysqld: Unknown error 1146
150127 11:36:07 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
150127 11:36:07  InnoDB: Initializing buffer pool, size = 8.0M
150127 11:36:07  InnoDB: Completed initialization of buffer pool
150127 11:36:07  InnoDB: Started; log sequence number 0 44233
150127 11:36:07 [ERROR] Aborting

/var/log/mysqld.log contains nothing,
/var/run/mysqld is an empty directory

Already checked/tried:

  • I have tried mysql secure installationand complete reinstallation a few times,
  • Tried to manually insert an errmsg.sys file,
  • Tried to install initial tables and databases manually. The Mysql user exists and it is the owner and has the necessary privileges over it's files,
  • Tried to start mysql service and mysqld service through init.d and all other ways, no service containing mysql or mysqld is running.

Basically I tried everything I found on the forums, so the problem is I need to install and set mysql service to run. These are the details and errors I have. If I need to post more details please let me know.

  • Ahaha! I found out how to reinstall mysql-community-server, as you writing it here. I found a good description at dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/… in the chapter 2: ...you can also select a release series by editing manually the /etc/yum.repos.d/mysql-community.repo file. This is a typical entry for a release series' subrepository in the file: # Enable to use MySQL 5.6 [mysql56-community] name=MySQL 5.6 Community Server baseurl=repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch enabled=1 gpgcheck=1 gpgkey=file:/etc/pki/rpm-gpg/RPM-G
    – user111581
    Apr 23, 2015 at 7:24

2 Answers 2


Finally solved it...

If someone gets in a similar situation where no mysql-server install doesn't go through, after making sure that the installation steps were correct but service won't start or create necessary files see the following:

Problem was: I looked at my repos, fault was there, i had corrupted repos that led to downloading and installing wrong mysql-server version or something.

Solution: Remove Mysql completely and all files, Find your correct repo rpm package on http://dev.mysql.com/downloads/repo/yum/ download the correct version and install the rpm package through yum localinstall, verify if the correct repo is enabled :

# yum repolist enabled | grep "mysql.*-community.*"

Only one version is allowed to be enabled at a time !

Then install mysql-server again through yum

yum install mysql-community-server

Run the service mysqld again and it will create all the necessary files and tables without an error.


Yet another solution is to update packages.

Todo on fresh centos installation (mysql is not installed yet):

yum check-update
yum update
yum install mysql mysql-server

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .