{"id":8659,"date":"2021-04-15T20:42:31","date_gmt":"2021-04-15T17:42:31","guid":{"rendered":"https:\/\/kifarunix.com\/?p=8659"},"modified":"2024-03-18T23:01:31","modified_gmt":"2024-03-18T20:01:31","slug":"install-mariadb-10-5-on-freebsd-13","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-mariadb-10-5-on-freebsd-13\/","title":{"rendered":"Install MariaDB 10.5 on FreeBSD 13"},"content":{"rendered":"\n

In this tutorial, you will how to install MariaDB 10.5 on FreeBSD 13. \u201cMariaDB 10.5<\/a> is the current stable series of MariaDB. It is an evolution of MariaDB 10.4<\/a> with several entirely new features<\/a> not found anywhere else and with backported and reimplemented features from MySQL\u201d<\/em>.<\/p>\n\n\n\n

Are you still running FreeBSD 12? Hold on, FreeBSD 13.0 has been released and you can now backup your data and upgrade your FreeBSD 12 box to FreeBSD 13.<\/p>\n\n\n\n

freebsd-version<\/code><\/pre>\n\n\n\n
13.0-RELEASE<\/code><\/pre>\n\n\n\n

Follow the link below to upgrade it;<\/p>\n\n\n\n

Upgrade FreeBSD 12 to 13<\/a><\/p>\n\n\n\n

Installing MariaDB 10.x on FreeBSD 13<\/h2>\n\n\n\n

Run System Update<\/h3>\n\n\n\n

Assuming that you are installing MariaDB 10.5 on a newly installed FreeBSD 13, update and FreeBSD package catalogue.<\/p>\n\n\n\n

pkg update<\/code><\/pre>\n\n\n\n
pkg upgrade<\/code><\/pre>\n\n\n\n

Install MariaDB 10.5<\/h3>\n\n\n\n

The FreeBSD 13 package catalogue provides the latest stable release versions of MariaDB, which is MariaDB 10.5.9 as of this writing.<\/p>\n\n\n\n

pkg search mariadb<\/code><\/pre>\n\n\n\n
mariadb-connector-c-3.1.10     MariaDB database connector for C\nmariadb-connector-odbc-3.1.11  MariaDB database connector for odbc\nmariadb103-client-10.3.28_1    Multithreaded SQL database (client)\nmariadb103-server-10.3.28      Multithreaded SQL database (server)\nmariadb104-client-10.4.18      Multithreaded SQL database (client)\nmariadb104-server-10.4.18      Multithreaded SQL database (server)\nmariadb105-client-10.5.9       Multithreaded SQL database (client)\nmariadb105-server-10.5.9       Multithreaded SQL database (server)<\/strong><\/code><\/pre>\n\n\n\n

Therefore, to install MariaDB 10.5, simply execute the command below;<\/p>\n\n\n\n

pkg install mariadb105-server mariadb105-client<\/code><\/pre>\n\n\n\n
Updating FreeBSD repository catalogue...\nFreeBSD repository is up to date.\nAll repositories are up to date.\nThe following 14 package(s) will be affected (of 0 checked):\n\nNew packages to be INSTALLED:\n\tboost-libs: 1.72.0_3\n\tgalera26: 26.4.6_1\n\ticu: 68.2,1\n\tlibedit: 3.1.20210216,1\n\tlibiconv: 1.16\n\tliblz4: 1.9.3,1\n\tlibxml2: 2.9.10_3\n\tmariadb105-client: 10.5.9\n\tmariadb105-server: 10.5.9\n\tpcre2: 10.36\n\trsync: 3.2.3\n\tunixODBC: 2.3.9\n\txxhash: 0.8.0\n\tzstd: 1.4.8\n\nNumber of packages to be installed: 14\n\nThe process will require 473 MiB more space.\n57 MiB to be downloaded.\n\nProceed with this action? [y\/N]: y<\/code><\/pre>\n\n\n\n

Running MariaDB 10.5 on FreeBSD 13<\/h4>\n\n\n\n

Once the installation is installed, you can start MariaDB on FreeBSD 13;<\/p>\n\n\n\n

service mysql-server onestart<\/code><\/pre>\n\n\n\n

Checking the status of MariaDB service on FreeBSD 13<\/p>\n\n\n\n

service mysql-server onestatus<\/code><\/pre>\n\n\n\n
mysql is running as pid 1269.<\/code><\/pre>\n\n\n\n

You can enable MariaDB to run on system boot using the command below;<\/p>\n\n\n\n

sysrc mysql_enable=yes<\/code><\/pre>\n\n\n\n

Or simply run;<\/p>\n\n\n\n

service mysql-server enable<\/code><\/pre>\n\n\n\n

You would then be able to manage MariaDB service as follows;<\/p>\n\n\n\n

To start MariaDB service;<\/p>\n\n\n\n

service mysql-server start<\/code><\/pre>\n\n\n\n

To stop the service;<\/p>\n\n\n\n

service mysql-server stop<\/code><\/pre>\n\n\n\n

Disable the service from running on system boot;<\/p>\n\n\n\n

service mysql-server disable<\/code><\/pre>\n\n\n\n

Restart MariaDB 10.5 on FreeBSD 13<\/p>\n\n\n\n

service mysql-server restart<\/code><\/pre>\n\n\n\n

Check Status;<\/p>\n\n\n\n

service mysql-server status<\/code><\/pre>\n\n\n\n

Securing MariaDB 10.5 on FreeBSD 13<\/h3>\n\n\n\n

MariaDB comes with a default security script, mysql_secure_installation <\/code><\/strong>that is used to improve the security of MariaDB installation by:<\/p>\n\n\n\n