[MDEV-16321]  Postinstall script referencing a wrong PATH for /usr/bin/mysql_install_db and better solutions suggestion Created: 2018-05-29  Updated: 2019-04-10

Status: Open
Project: MariaDB Server
Component/s: Packaging, Platform Debian
Affects Version/s: 10.1
Fix Version/s: 10.1

Type: Bug Priority: Minor
Reporter: Faustin Lammler Assignee: Faustin Lammler
Resolution: Unresolved Votes: 0
Labels: systemd
Environment:

Debian



 Description   

Hi,
script referenced by postinstall script is wrong '/usr/scripts/scripts/mysql_install_db':
mysqld_safe[25030]: The problem could be conflicting information in an external
mysqld_safe[25030]: my.cnf files. You can ignore these by doing:
mysqld_safe[25030]:
mysqld_safe[25030]: shell> /usr/scripts/scripts/mysql_install_db --defaults-file=~/.my.cnf

Should be '/usr/bin/mysql_install_db'.

Error was originallly caused by an apparmor old mysqld profile (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865534) and:
mysqld_safe[25030]: #007/usr/sbin/mysqld: Can't read dir of '/etc/mysql/mariadb.conf.d/' (Errcode: 13 "Permission denied")

Question: is it possible/do we want to - have more intelligent postinstall script that could suggest better solutions?



 Comments   
Comment by Otto Kekäläinen [ 2018-06-05 ]

I read this but from the top of my head I don't have an approach to suggest.

Comment by Faustin Lammler [ 2018-07-03 ]

Ok keeping this in my todo list.

I am also adding this FTR:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865534

As suggestion from Michael Schaller seems relevant:
> After that the retry of the postinst worked but took a while and there
> wasn't any progress indicator and so some people might get the false
> impression that the postinst hangs:
>
> $ sudo dpkg --configure mariadb-server-10.1 2>&1 | ts
> Jul 05 05:21:09 Setting up mariadb-server-10.1 (10.1.23-9+deb9u1) ...
> Jul 05 05:24:31 Created symlink /etc/systemd/system/mysql.service →
> /lib/systemd/system/mariadb.service.
> ...
>
> It turned out (re-run with strace) that this scans over all the users
> (and we have a ton of users on the system) and that this can take a
> while

> 2) A message should be printed that this might take a while and to be patient.

Generated at Thu Feb 08 08:28:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.