美文网首页
Centos7 安装MariaDB

Centos7 安装MariaDB

作者: liurongming | 来源:发表于2017-04-03 17:25 被阅读0次

安装MariaDB

Here is your custom MariaDB YUM repository entry for CentOS. Copy and paste it into a file under /etc/yum.repos.d/(we suggest naming the file MariaDB.repo or something similar).

# MariaDB 10.1 CentOS repository list - created 2017-03-08 06:38 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

After the file is in place, install MariaDB with:

sudo yum install MariaDB-server MariaDB-client

After install success

// 启动mariadb 
# systemctl start mariadb 
// 开机自启动
# systemctl enable mariadb 
// 查看启动状态
# systemctl status mariadb   

配置mariadb

修改本地root用户密码,并开放root远程访问权限

  • set password for root@localhost = password('123456');
  • grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
  • FLUSH PRIVILEGES;

相关文章

网友评论

      本文标题:Centos7 安装MariaDB

      本文链接:https://www.haomeiwen.com/subject/fzloottx.html