← Back to team overview

maria-developers team mailing list archive

Re: passwordless mariadb root login with auht_socket in Debian


I just ran manually the script, it ran without an error on the shell but errors arisen on the mysqld error log :
        ERROR: 1062  Duplicate entry 'unix_socket' for key 'PRIMARY'
        150303  9:57:41 [ERROR] Aborting
ERROR: 1290 The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
        150303  9:57:50 [ERROR] Aborting

The first one must be caused by the fact that i already had the plugin loaded, it should be avoided easily by using "REPLACE INTO" as having "false positive" errors on the log will be confusing for the user.

For the second error, it must simply be the "DROP USER 'debian-sys-maint'@'localhost';" that should be replaced by a DELETE on the mysql.user table.

As for the whole "operation", at first it seems that its a good idea but after some tought it will probably break certain setups, for example users that are using the root user from accounts other than root (its not a good practice but i saw it more than once in the past). There also could be users relying on the debian-sys-maint account that gets removed by the install script, there should be at least a warning notice before the package gets installed of these changes.

Le 03/03/2015 09:07, Otto Kekäläinen a écrit :
If you don't want to build debian packages but only focus on the
postinst script editing, you could just add the repository 'deb
http://labs.seravo.fi/~otto/mariadb-repo/ sid-amd64/' to a sid virtual
machine and install using my 10.0.17-1~exp1 builds

To test changes in the postinstall file, you don't need to build the
whole package, you could just use my ready-build binaries above and
inject your own postinst script with 'sudo cp
/var/lib/dpkg/info/mariadb-server-10.0.postinst' (/var/lib/dpkg/info
is where dpkg unpacks the scripts before running them).

Or you could even run directly 'sh -x
debian/mariadb-server-10.0.postinst configure' as that is the command
that dpkg would run in the configure step.