On 2022/02/14 22:53, [email protected] wrote: > I have installed mariadb with: > > # pkg_add mariadb-server > > Then run the install script: > > # /usr/local/bin/mariadb-install-db > > Then created the chroot directory for the MariaDB socket: > > # install -d -m 0711 -o _mysql -g _mysql /var/www/var/run/mysql > > And adjust /etc/my.cnf to use the socket in the chroot: > > [client-server] > socket = /var/www/var/run/mysql/mysql.sock > > But when I try to start the server: > > # rcctl start mysqld > > I get the following error in the log (timestamp removed): > > [ERROR] Can't start server : Bind on unix socket: Permission denied > [ERROR] Do you already have another server running on socket: > /var/www/var/run/mysql/mysql.sock ? > [ERROR] Aborting > > # ls -l /var/www/var/run > drwx--x--x 2 _mysql _mysql 512 Feb 14 22:42 mysql > > What's missing?
Check permissions on the parent directories (e.g. /var/www/var/run and /var/www/var must be at least executable by the _mysql user). Check contents of /var/www/var/run/mysql.
