Wednesday, October 01, 2025

Re: mariadb-secure-installation doesn't connect to configured socket

> Hello!
>
> I've recently upgraded a server with MariaDB to OpenBSD 7.7. After following
> everything I wanted to be sure that upgrading to 11.4 didn't result in
> somehow installing the defaults removed when I originally installed (10.x)
> and ran mariadb-secure-installation.
>
> However, running mariadb-secure-installation prints the following error:
>
> ERROR 2002 (HY000): Can't connect to local server through socket
> '/var/run/mysql/mysql.sock' (2)
>
> This makes sense as I have the following my.cnf:
>
> [client-server]
> socket=/var/www/run/mysql/mysql.sock
> #port=3306
>
> It's possible this is not new behavior, but I wanted to see if this is
> expected as I was thinking that it would use the configured socket location.
>
> Thank you,
>
>
> Paul
>

What happens if you add --socket=/var/www/run/mysql/mysql.sock to the command line when
executing the script?

No comments:

Post a Comment