centos7 安装mariadb

时间:2018-06-07 17:44:01   收藏:0   阅读:194
centos7 安装mariadb

一、使用国内源:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-
Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo
http://mirrors.aliyun.com/repo/Centos-7.repo

二、安装mariadb
yum -y install mariadb mariadb-server mariadb-devel

三、cat /etc/my.cnf
[mysqld]

default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = ‘SET NAMES utf8‘
character-set-server = utf8

四、启动mariadb
root用户直接启动,由于我的环境是vagrant ssh连接的,默认的是vagran用户

systemctl start mariadb    #用root用户启动,非root用户需要sudo
mysql

原文:http://blog.51cto.com/bajiebushizhu/2126062

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!