Well, unfortunately, it still doesn't work, even after I did all the steps indicated during the installation of mariadb. I am therefore reopening this.
I want to have a password for user root. For that, before I install mysqld-s6, I run
# mysqld_safe --skip-grant-tables --skip-networking &
# mysql -u root
> flush privileges;
> ALTER USER 'root'@'localhost' IDENTIFIED BY 'pass123abc';
> flush privileges;
where "pass123abc" is my password. After that, I can test this with mysql -u root -p and it works fine without error. But after I pkill mysqld_safe and install mysqld-s6, even after reboot, I'm getting (as root):
# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
By the way, there is no need to add mysqld to default bundle in s6, because somehow it automagically still gets started, as indicated in previous posts. (Edit: See my last post.)
# ls /run
acpid.socket crond.pid dhcpcd initramfs lock lvmpolld.pid nscd service syslog-ng.pid udev utmp
agetty.reload cron.reboot elogind.pid lightdm lvm mount s6-rc sudo systemd uncaught-logs
connman-vpn dbus httpd lightdm.pid lvmetad.pid named s6-rc:s6-rc-init:goL8Cg syslog-ng.ctl tmpfiles.d user
# ls /var/run
acpid.socket crond.pid dhcpcd initramfs lock lvmpolld.pid nscd service syslog-ng.pid udev utmp
agetty.reload cron.reboot elogind.pid lightdm lvm mount s6-rc sudo systemd uncaught-logs
connman-vpn dbus httpd lightdm.pid lvmetad.pid named s6-rc:s6-rc-init:goL8Cg syslog-ng.ctl tmpfiles.d user
# ps aux | grep mysql
root 255 0.0 0.0 2784 900 ? S 22:06 0:00 s6-supervise mysqld
root 2600 0.0 0.0 9472 2228 pts/0 S+ 22:13 0:00 grep --colour=auto mysql
# /etc/my.cnf
#
# This group is read both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include *.cnf from the config directory
#
!includedir /etc/my.cnf.d