Is it possible to read env vars in MySQL option file my.ini/my.cnf, the way it is possible in httpd.conf and php.ini with the ${ENVVAR} syntax :
datadir="${MYSQL_DATA_HOME}/Data/"
If yes, what is the syntax ?
I think it is not possible. I tried making the same changes in MySQL option file, but failed to start. But there is another way though.
Set MYSQL_DATA_HOME=<some dir>
in the console. And in the same terminal start mysql not by service start
but with this command mysqld --datadir=$MYSQL_DATA_HOME/whatever
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With