CentOS7安装MariaDB|CentOS7如何安装MariaDB|Linux安装MariaDB详解

MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可 MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能轻松成为MySQL的代替品。

本文介绍CentOS7.6安装MariaDB过程。

执行安装命令:

[root@db ~]# yum -y install mariadb*Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: centos.ustc.edu.cn * epel: mirrors.njupt.edu.cn * extras: centos.ustc.edu.cn * updates: centos.ustc.edu.cnResolving Dependencies--> Running transaction check---> Package mariadb.x86_64 1:5.5.60-1.el7_5 will be installed---> Package mariadb-bench.x86_64 1:5.5.60-1.el7_5 will be installed---> Package mariadb-devel.x86_64 1:5.5.60-1.el7_5 will be installed---> Package mariadb-embedded.x86_64 1:5.5.60-1.el7_5 will be installed---> Package mariadb-embedded-devel.x86_64 1:5.5.60-1.el7_5 will be installed---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be installed---> Package mariadb-server.x86_64 1:5.5.60-1.el7_5 will be installed--> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.60-1.el7_5.x86_64---> Package mariadb-test.x86_64 1:5.5.60-1.el7_5 will be installed--> Running transaction check---> Package perl-DBD-MySQL.x86_64 0:4.023-6.el7 will be installed--> Finished Dependency Resolution....

开机自动启动MariaDB:​​​​​​​

[root@db ~]# systemctl enable mariadbCreated symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

启动MariaDB:

[root@db ~]# systemctl start mariadb

查看MariaDB状态:​​​​​​​

[root@db ~]# systemctl status mariadb● mariadb.service - MariaDB database server   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)   Active: active (running) since Fri 2019-09-13 22:54:44 CST; 32s ago  Process: 3280 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)  Process: 3201 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) Main PID: 3279 (mysqld_safe)   CGroup: /system.slice/mariadb.service           ├─3279 /bin/sh /usr/bin/mysqld_safe --basedir=/usr           └─3441 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/va...
Sep 13 22:54:42 db mariadb-prepare-db-dir[3201]: '/usr/bin/mysql_secure_installation'Sep 13 22:54:42 db mariadb-prepare-db-dir[3201]: which will also give you the option of removing the testSep 1
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值