I have created a script to automatically install MySQL 5.6 on Ubuntu Server 12.10 (64bit). From all the information I gather I created the following script (different functions that's why you see multiple $1, $2, ect):
apt-get install libaio1 -y
groupadd mysql
useradd -r -g $3 $1
# $1 = Download URL MySQL (http://www.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.10-debian6.0-x86_64.deb/from/http://cdn.mysql.com/)
echo "-Starting mysql_install-"
wget $1 -O mysql-5.6.10-debian6.0-x86_64.deb
dpkg -i mysql-5.6.10-debian6.0-x86_64.deb
rm mysql-5.6.10-debian6.0-x86_64.deb
# $1 = MySQL root username
# $2 = MySQL root password
# $3 = MySQL group
echo "-Starting mysql_config-"
cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server
cp /opt/mysql/server-5.6/support-files/my-default.cnf /etc/my.cnf
cp /opt/mysql/server-5.6/support-files/mysql-log-rotate /etc/logrotate.d/mysql.server
chmod +x /etc/init.d/mysql.server
update-rc.d mysql.server defaults
chown -R mysql /opt/mysql/server-5.6/
chgrp -R mysql /opt/mysql/server-5.6/
sed -i "s/^# basedir[[:blank:]]*=.*/basedir = \/opt\/mysql\/server-5.6/" /etc/my.cnf
sed -i "s/^# port[[:blank:]]*=.*/port = 3360/" /etc/my.cnf
echo -e "lc-messages-dir = /opt/mysql/server-5.6/share" >> /etc/my.cnf
echo 'export PATH=$PATH:/opt/mysql/server-5.6/bin' | sudo tee /etc/profile.d/mysql.server.sh
So far so good, but when I try to start MySQL server with:
service mysql.server start
The following error message appears:
Starting MySQL . * The server quit without updating PID file (/opt/mysql/server-5.6/data/Playfair01.pid).
The directory were the PID file is stored did not exist. I created this directory and tried chrowning this folder without success:
chown mysql:mysql /opt/mysql/server-5.6/data
I have tried deleting temp files, PID files and lock file without success. Is there anyone how had this similar issue and solved it? Or if someone has ideas how to fix this please share this information with me.
Many thanks, Raoul