Not the answer you need?
Register and ask your own question!

The priority of my.cnf

shawnxiongshawnxiong EntrantLegacy User Role Beginner
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:

0. apt-get install myql-common (mysql-common_5.5.55-0+deb8u1_all.deb), for compiling php

1. fetch Percona-Server-5.5.25a-rel27.1-277.Linux.x86_64.tar.gz from office site, decompressing to /usr/local/customized_dir/mysql
2. creates user (mysql); create directory: datadir and logdir, then chown mysql:mysql ..
3. config /etc/my.cnf with some paramters (basedir, datadir, logdir...)
4. cp /usr/local/customized_dir/mysql/support-files/mysql.server /etc/init.d/mysqld
4. mysql_install_db --defaults-file=/etc/my.cnf --user=mysql
5. 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
1.png 40.3K
2.png 43.8K
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.