← Back to team overview

maria-discuss team mailing list archive

mysql_install_db as user

 

Hello,

	Is this script supposed to be runnable as a normal (i.e., non-root) user?

In MySQL 5.6 there is logic that prevents the chown() of the mysql data dir when running as non-root. MariaDB 10.1.8 doesn’t seem to have this logic, so the script fails when chown() fails.

Is this change intended? We have tests that verify functionality of user-created, UNIX-socket-only MySQL/MariaDB servers. These work on MySQL 5.6 but not on MariaDB 10.1.

	Here is the command-line output:

---------------
~/temp $ /usr/bin/mysql_install_db --datadir=mysqldata
chown: changing ownership of `mysqldata': Operation not permitted
Cannot change ownership of the database directories to the 'mysql'
user.  Check that you have the necessary permissions and try again.
bash: __git_ps1: command not found
---------------

	Thank you for your time!

-Felipe Gasper
Houston, TX


Follow ups