centos下用yum安装mariadb

前端之家收集整理的这篇文章主要介绍了centos下用yum安装mariadb前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、配置yum

cd /etc/yum.repos.d

vi MariaDB.repo

内容

# MariaDB 5.5 CentOS repository list - created 2016-07-24 06:10 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1


以上内容为MariaDB官网自动生成,其他系统可在以下地址生成

https://downloads.mariadb.org/mariadb/repositories/#mirror=tuna&distro=CentOS&distro_release=centos6-amd64--centos6&version=5.5



For CentOS,RedHat,and Fedora,it is highly recommended to install from a repository usingyum. This page walks you through the simple steps.


2、完成以上配置后,即可运行以下命令开始安装:

sudo yum install MariaDB-server MariaDB-client
3、按照页面指引输入两次“y”,看到以下信息即表示安装成功:
Installed:
  MariaDB-client.x86_64 0:5.5.50-1.el6                                                           MariaDB-server.x86_64 0:5.5.50-1.el6                                                          


Dependency Installed:
  MariaDB-common.x86_64 0:5.5.50-1.el6                             MariaDB-compat.x86_64 0:5.5.50-1.el6                             perl-DBI.x86_64 0:1.609-4.el6                            


Complete!

4、启动:
sudo /etc/init.d/MysqL start
5、yum安装后,mariadb默认为开机启动:

[root@DB1 yum.repos.d]# chkconfig --list|grep MysqL
MysqL 0:關閉1:關閉2:開啟3:開啟4:開啟5:開啟6:關閉


6、相关目录

数据库目录:/var/lib/MysqL/ 配置文件:/usr/share/MysqLMysqL.server命令及配置文件) 相关命令:/usr/bin(MysqLadmin MysqLdump等命令) 启动脚本:/etc/rc.d/init.d/(启动脚本文件MysqL的目录)

猜你在找的CentOS相关文章