Hi,
there are something confusing me when I’m going to install Percona-Server-5.5 (Percona-Server-5.5.25a-rel27.1-277.Linux.x86_64.tar.gz) on Debian 8.8, the steps that Percona-Server installed as follows:
-
apt-get install myql-common (mysql-common_5.5.55-0+deb8u1_all.deb), for compiling php
-
fetch Percona-Server-5.5.25a-rel27.1-277.Linux.x86_64.tar.gz from office site, decompressing to /usr/local/customized_dir/mysql
-
creates user (mysql); create directory: datadir and logdir, then chown mysql:mysql …
-
config /etc/my.cnf with some paramters (basedir, datadir, logdir…)
-
cp /usr/local/customized_dir/mysql/support-files/mysql.server /etc/init.d/mysqld
-
mysql_install_db --defaults-file=/etc/my.cnf --user=mysql
-
ln -sf ${INSTALL_DIR}/${MYSQL_DIR}/bin/* /usr/local/bin/
step 0 is not necessary for installing Percona-Server-5.5, but it’s will generate a dir with default my.cnf, /etc/mysql/my.cnf
Issues:
if the mysql-common isn’t installed, /etc/init.d/mysqld restart will be succeed;
if the mysql-common installed before Percona-Server, /etc/init.d/mysqld restart will be failed, because it can’t fine mysqld_safe, the /etc/mysql/my.cnf override /etc/my.cnf, see figure 1.
figure 1
but as the specification of mysql doc and the mysql.server:
as defaults, the SYSCONFDIR should be /etc, so the /etc/my.cnf should override /etc/mysql/my.cnf, but the result is opposite.
Please give me a hand, thanks in advance.
Shawn