在Ubuntu 22.04中安装MariaDB 10.6(使用操作系统自带的安装方式)

首先

在Ubuntu 22.04上安装MariaDB 10.6
原文:MySQL、MariaDB的各种安装方法和EOL总结 – Qiita

登录

安装

# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

# apt update; apt install -y mariadb-server
... 略

各种确认 (gè

# service mariadb start
# mysql -u root -e'select version();'
+-------------------------+
| version()               |
+-------------------------+
| 10.6.7-MariaDB-2ubuntu1 |
+-------------------------+

请注意

在特定环境下,如果不进行以下设置,MariaDB可能无法启动。
在WSL2(Win10)上无法启动Mariadb服务-询问Ubuntu
https://askubuntu.com/a/1409701

广告
将在 10 秒后关闭
bannerAds