I don't run mysql_secure_installation but have the credentials stored in
/root/.my.cnf only, as suggested in various web howtos.

>From Ubuntu-20.4: iiab-admin@box:~$ sudo systemctl status mariadb --no-pager -l
● mariadb.service - MariaDB 10.3.22 database server
     Loaded: loaded 
(]8;;file://box.lan/etc/systemd/system/mariadb.service/etc/systemd/system/mariadb.service]8;;;
 enabled; vendor preset: enabled)
     Active: active (running) since Sat 2020-08-22 10:09:12 EDT; 2h 47min ago
       Docs: ]8;;man:mysqld(8)man:mysqld(8)]8;;
             
]8;;https://mariadb.com/kb/en/library/systemd/https://mariadb.com/kb/en/library/systemd/]8;;
    Process: 661 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d 
/var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 684 ExecStartPre=/bin/sh -c systemctl unset-environment 
_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 687 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && 
VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl 
set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, 
status=0/SUCCESS)
    Process: 893 ExecStartPost=/bin/sh -c systemctl unset-environment 
_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 918 ExecStartPost=/etc/mysql/debian-start (code=exited, 
status=0/SUCCESS)
   Main PID: 768 (mysqld)
     Status: "Taking your SQL requests now..."
      Tasks: 30 (limit: 2319)
     Memory: 91.3M
     CGroup: /system.slice/mariadb.service
             └─768 /usr/sbin/mysqld

Aug 22 10:09:09 box.lan systemd[1]: Starting MariaDB 10.3.22 database server...
Aug 22 10:09:11 box.lan mysqld[768]: 2020-08-22 10:09:11 0 [Note] 
/usr/sbin/mysqld (mysqld 10.3.22-MariaDB-1ubuntu1) starting as process 768 ...
Aug 22 10:09:12 box.lan systemd[1]: Started MariaDB 10.3.22 database server.
Aug 22 10:09:12 box.lan debian-start[987]: ERROR 1045 (28000): Access denied 
for user 'root'@'localhost' (using password: NO)


Think the reason is the mariadb.service has 
ExecStartPost=/etc/mysql/debian-start which then calls mysqlcheck then looks in 
/etc/mysql/debian.cnf for the password which is not present.

Given that debian-start is from the same era as
mysql_secure_installation perhaps that routine needs looking at also?

What would be the current best practice, using /root/.my.cnf or
/etc/mysql/debian.cnf?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1582209

Title:
  mysql_secure_installation does not update /etc/mysql/debian.cnf

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mariadb-10.0/+bug/1582209/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to