Centos7 安装MariaDB

安装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;
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容