Linux – Install MySQL 5.6 on CentOS 6.3 gone WRONG

centoslinuxMySQLmysql5.5rpm

I am trying to install MySQL 5.6 on CentOS 6.3 64bit using the .rpms provided by MySQL. I downloaded all the 64bit linux rpms into /usr/local/src/mysql and performed rpm -Uvh *.

The installation gave an error which I cant find out the error msg anymore. So I tried doing rpm -Uvh * again and it says

Preparing...                ########################################### [100%]

package MySQL-devel-5.6.6_m9-1.linux2.6.x86_64 is already installed
package MySQL-embedded-5.6.6_m9-1.linux2.6.x86_64 is already installed
package MySQL-shared-compat-5.6.6_m9-1.linux2.6.x86_64 is already installed
package MySQL-shared-5.6.6_m9-1.linux2.6.x86_64 is already installed
package MySQL-client-5.6.6_m9-1.linux2.6.x86_64 is already installed

Doing rpm -e MySQL* states that they are all not installed:

error: package MySQL-client-5.6.6_m9-1.linux2.6.x86_64.rpm is not installed
error: package MySQL-devel-5.6.6_m9-1.linux2.6.x86_64.rpm is not installed
error: package MySQL-embedded-5.6.6_m9-1.linux2.6.x86_64.rpm is not installed
error: package MySQL-server-5.6.6_m9-1.linux2.6.x86_64.rpm is not installed
error: package MySQL-shared-5.6.6_m9-1.linux2.6.x86_64.rpm is not installed
error: package MySQL-shared-compat-5.6.6_m9-1.linux2.6.x86_64.rpm is not installed

I tried starting mysql with /etc/init.d/mysql start and /etc/init.d/mysqld start but the error returned was no such file or directory.

I tried rpm --rebuilddb and tried installing and removing but get the same error.

I'm kind of stuck now as to what to do next. Any suggestions?


Update

I managed to get mysql installed by uninstalling and reinstalling the rpm.

Now when I try to start mysql,

/etc/init.d/mysql start
Starting MySQL.The server quit without updating PID file (/[FAILED]mysql/localhost.localdomain.pid).`

I tried mv /etc/my.cnf /etc/my.cnf.bak and /etc/init.d/mysql start but that gave the same error.

Best Answer

Do you have SELinux enabled? It's possible that the MySQL packages are not built to play nice with SELinux (not uncommon for 3rd party packages) and that it is blocking access to creating the PID file. A quick and dirty test would be to set your SELinux context to Permissive (or Disabled)

# setenforce permissive

If that is not the case then have a look at the file permissions themselves.

For more information on SELinux:
Red Hat SELinux Documentation for RHEL6
SELinux Project Wiki