MariaDB 10.4 On OpenBSD 6.7: Install

nabbisen - Jul 8 '20 - - Dev Community

Installing MariaDB 10.4 on OpenBSD 6.7 is almost the same to MariaDB 10.0 on OpenBSD 6.4:

There is, however, a significant difference: "The unix_socket authentication plugin is now default on Unix-like systems" since MariaDB 10.4.

The steps to install it is as below.
First, install the package and prepare the daemon:

$ doas pkg_add mariadb-server
Enter fullscreen mode Exit fullscreen mode

pkg-readme is created as /usr/local/share/doc/pkg-readmes/mariadb-server.
Create a default database first:

$ doas rcctl enable mysqld
$ doas mysql_install_db
$ doas rcctl start mysqld
Enter fullscreen mode Exit fullscreen mode

Then execute:

$ doas mysql_secure_installation
Enter fullscreen mode Exit fullscreen mode

You'll be asked whether to use the unix_socket authentication or not, after the first confirmation "Enter current password for root (enter for none):".
The steps followed by it were as usual; such as whether to set root password, remove anonymous users, disallow root login remotely and remove test database.
That'll be it.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .