It could be SELinux problem.
Check if SELinux is enabled is using the following command.
It should give an output like the following. If the status parameter is enabled and “Current Mode” is enforcing, it means SElinux is blocking your MySQL daemon operations.
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
You need to Set SELinux to permissive mode. Open the SELinux config file
sudo vi /etc/sysconfig/selinux
Change the “SELINUX=enforcing” parameter to “SELINUX=permissive” and save the SeLinux configuration file as shown below.
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection. SELINUXTYPE=targeted
Now reboot the server for the changes to take place properly.
Start the mysql service after the reboot. It should work fine.