前言
MariaDB 数据库管理系统是 MySQL 的一个分支,主要由开源社区在维护,采用 GPL 授权许可。
安装 MariaDB 5.5
通过yum安装MariaDB 5.5
1
| yum install mariadb mariadb-server mariadb-devel mariadb-libs –y
|
配置MariaDB 5.5
1 2 3 4 5 6 7 8 9 10 11 12
| systemctl start mariadb systemctl enable mariadb mysql_secure_installation
Enter current password for root (enter for none): Set root password? [Y/n] New password: Re-enter new password: Remove anonymous users? [Y/n] Disallow root login remotely? [Y/n] Remove test database and access to it? [Y/n] Reload privilege tables now? [Y/n]
|
测试连接MariaDB 5.5
1 2 3 4 5
| mysql -u root -p Enter password: Welcome to the MariaDB monitor.... ..... MariaDB [(none)]>
|
安装MariaDB 10.9
配置repo源
1 2 3 4 5 6 7 8 9
| cd /etc/yum.repos.d/ vim MariaDB.repo
[mariadb] name = MariaDB baseurl = https://mirrors.aliyun.com/mariadb/yum/10.9/centos7-amd64/ module_hotfixes = 1 gpgkey = https://mirrors.aliyun.com/mariadb/yum/RPM-GPG-KEY-MariaDB gpgcheck = 1
|
通过yum安装MariaDB 10.9
1 2
| yum install -y mariadb-server mariadb-client rpm -ivh http://www.ivarch.com/programs/rpms/pv-1.6.20-1.x86_64.rpm
|
配置MariaDB 10.9
1 2 3 4 5 6 7 8 9 10 11 12
| systemctl start mariadb systemctl enable mariadb mariadb-secure-installation
Enter current password for root (enter for none): Set root password? [Y/n] New password: Re-enter new password: Remove anonymous users? [Y/n] Disallow root login remotely? [Y/n] Remove test database and access to it? [Y/n] Reload privilege tables now? [Y/n]
|
测试连接MariaDB 10.9
1 2 3 4 5
| mysql -u root -p Enter password: Welcome to the MariaDB monitor.... ..... MariaDB [(none)]>
|