Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| mariadb [2018/10/29 10:16] – fix a typo MateuszPiotrowski | mariadb [2021/06/02 23:03] (current) – Add MariaDB server install instructions and troubleshooting sections GaelanLloyd | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| < | < | ||
| DEFAULT_VERSIONS+=mysql=102m | DEFAULT_VERSIONS+=mysql=102m | ||
| + | </ | ||
| + | |||
| + | ====== MariaDB server installation ====== | ||
| + | |||
| + | There are many versions of %%MariaDB%% available in the repos. Use this command to list all available versions. | ||
| + | |||
| + | < | ||
| + | pkg search mariadb | grep server | ||
| + | </ | ||
| + | |||
| + | Install the version you wish (typically the latest version, replace the '' | ||
| + | |||
| + | * Installing the server will automatically installs the client as a dependency. | ||
| + | |||
| + | < | ||
| + | sudo pkg install mariadbXXX-server | ||
| + | </ | ||
| + | |||
| + | Set %%MariaDB%% to start at boot | ||
| + | |||
| + | < | ||
| + | sudo sysrc mysql_enable=YES | ||
| + | </ | ||
| + | |||
| + | Start %%MariaDB%% | ||
| + | |||
| + | < | ||
| + | sudo service mysql-server start | ||
| + | </ | ||
| + | |||
| + | Run this interactive script to perform basic security hardening of the installation. | ||
| + | |||
| + | * When asked, it's recommended to **not** provide a root database user password. (Accessing the server console as the root database user is done simply with '' | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Verify that %%MariaDB%% is only accessible via localhost | ||
| + | |||
| + | < | ||
| + | $ sockstat -4 -6 | grep 3306 | ||
| + | mysql mariadbd | ||
| + | </ | ||
| + | |||
| + | If the output lists '' | ||
| + | |||
| + | ===== Troubleshooting ===== | ||
| + | |||
| + | ==== Connections to localhost fail ==== | ||
| + | |||
| + | Try connecting via the UNIX socket as specified in '' | ||
| + | |||
| + | < | ||
| + | localhost:/ | ||
| </ | </ | ||
| Line 72: | Line 127: | ||
| ^ file**/ | ^ file**/ | ||
| | '' | | '' | ||
| - | | share/ | + | | share/ |
| ===== Upstream issues ===== | ===== Upstream issues ===== | ||
| Line 84: | Line 139: | ||
| ---- | ---- | ||
| - | {{tag> | + | {{tag> |