I think that this is impossible. I tried to make the same changes to the MySQL parameter file, but could not start. But there is another way.
Set MYSQL_DATA_HOME=<some dir> in the console. And in the same terminal, start mysql not with service start , but with this command mysqld --datadir=$MYSQL_DATA_HOME/whatever
source share