1

I'm download this version mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz. I would like to make a specific install for example :

basedir = /sgbd/mysql/5.6/mysql
datadir = /data/mysql/MYSDTESTP02
socket = /sgbd/mysql/5.6/mysql/conf/MYSDTESTP02.socket

I have done this :

./scripts/mysql_install_db --user=mysql --defaults-file=/sgbd/mysql/5.6/mysql/conf/my.cnf --keep-my-cnf --no-defaults

cp /sgbd/mysql/5.6/mysql/support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld    
chkconfig --add mysqld
chkconfig --level 345 mysqld on
systemctl daemon-reload

./bin/mysqld_safe --defaults-file=/sgbd/mysql/5.6/mysql/conf/my.cnf --log_error=/data/mysql/[instance_name]/mysql_error.log --socket=/sgbd/mysql/5.6/mysql/conf/TESTP02.socket &

./bin/mysql_secure_installation --user=mysql --defaults-file=/sgbd/mysql/5.6/mysql/conf/my.cnf --keep-my-cnf --socket=/sgbd/mysql/5.6/mysql/conf/TESTP02.socket

systemctl restart mysqld

it's ok but when i restart the service of mysqld, i have a socket on /tmp/mysql.sock and the /sgbd/mysql/5.my.cnf is ignored

ps : i have edit the mysqld on /etc/init.d/mysqld

line  46 basedir=/sgbd/mysql/5.6/mysql
line  47 datadir=/data/mysql//[instance_name]
line  48 socket=/sgbd/mysql/5.6/conf
line  68  basedir=/sgbd/mysql/5.6/mysql
line  69  bindir=/sgbd/mysql/5.6/mysql/bin
line  72  datadir=/data/mysql/[instance_name]
line  74  sbindir=/sgbd/mysql/5.6/mysql/bin
line  75  libexecdir=/sgbd/mysql/5.6/mysql/bin
line  209 conf=/sgbd/mysql/5.6/mysql/conf/my.cnf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.