Professional Documents
Culture Documents
mkdir -p /u01/mysql
mkdir -p /u01/mysql/data
mkdir -p /u01/mysql/logs
mkdir -p /u01/mysql/tmp
mkdir -p /u01/mysql/backups
Remove default mysql install directory and symlink to new mysql data directory:
Remove the default random mysql password generated by the RPM installation:
ls -l /root/.mysql_secret
rm /root/.mysql_secret
ls -l /root/.mysql_secret
Now we will start the MySQL service and configure the root user account:
/usr/sbin/setenforce Permissive
/etc/init.d/mysql start
Perform security hardening from within the MySQL CLI, including passwords that
conform to Acxiom Corporate Security Policy:
Permanent Change
The setenforce command does not require a server reboot but its also not going to
survive a reboot. To make the change permanent, ask your system admin to edit
/etc/selinux/config to set SELINUX=permissive
# 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.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Temporary Fix
> /usr/sbin/getenforce;
Enforcing
Read https://oramanageability.com/tag/usrsbinsetenforce/