#Stop MySQL before moving its stuff around
#Copy data folder to 2nd disk preserving its permissions
#Create my.cnf by coping from sample .cnf file provided with MySQL installation
#Edit (shell> vi /etc/my.cnf) to fix paths for socket file, add data option
#Start the server
#Error message ?
Starting MySQL.. ERROR! The server quit without updating PID file (/data/mysql/master.home.pid).
#Checking MySQL status returns this error ?
shell> service mysql status
#Error log is not updated at all ? (/data/mysql/master.home.err). If that all happens to you, than most probably the issue is caused by SELinux. You can double-check whether you have it ON. If you see this ... sestatus SELinux status: enabled SELinuxfs mount: /selinux Current mode: enforcing Mode from config file: enforcing Policy version: 24 Policy from config file: targeted#then you have SELinux on. (If you see that SELinux is disabled, then probably you have another problem you'll need to attend to.) #You can turn SELinux off by editing file (/etc/selinux/config - update, SELINUX=disabled, save, reboot) but this will reduce the security of your system and is not recommended. It is a berter solution to tell SELinux your new location for MySQL databases must have applied the proper security context (the one used for MySQL databases). #Check the security type of default database folder and new location:
#This difference causes the error message at MySQL startup. Fix it.
#Check whether you have policycoreutils-python package installed.
#Map proper security context definition to new db locaion
#Label new db location by security context just defined:
#Check whether you have got proper labeling for new db location:
#Reboot
#After reboot you should have MySQL running ok:
#Also you should be able restart it successfully:
(Based on http://forums.mysql.com/read.php?10,520100,520469#msg-520469) |