First of all, this is the case I encountered and may not be useful on your case.
To reset the data in MySQL database, for the sake of fixing out-sync database replication.
- Stopped MySQL service
- Renamed the original data folder for backup purpose
- Create a new data folder with the same original name
- Execute database installation mysql_install_db
- Import the dumped data
- Set up replication
When executing database installation, the error message below appeared.
Installation of system tables failed!
The following command print nothing to the console.
After checking the log at /var/log/message, it is found that the SELinux prevented the installation.
Fix the security context issue used by SELinux
Sorry I am not going to provide the way here because I having really tried that myself.
Permanent set SELinux to Permissive or Disable (Security Risk)
Obviously this is not a good way to fix the problem but if you still want to do that, here is the way.
Edit the file:
Set to permissive
This is what you can see:
[root@my-server ~]# mysqld -V mysqld Ver 4.1.22-standard-log for pc-linux-gnu on i686 (MySQL Community Edition - Standard (GPL)) [root@my-server ~]#
Extra: Temperately disable SELinux
Here is the way:
echo 0 > /selinux/enforce