您的位置:首页 > 数据库 > MariaDB

centos7 yum安装 mariadb

2016-02-27 13:15 645 查看
从最新版本centos7开始,默认的是 Mariadb而不是mysql!使用系统自带的repos安装很简单:yum install mariadb mariadb-server
systemctl start mariadb ==> 启动mariadb
systemctl enable mariadb ==> 开机自启动
firewall-cmd --permanent --add-port=3306/tcp ==> 开放端口,允许远程访问systemctl restart firewalld==> 重启防火墙mysql_secure_installation ==> 设置 root密码等相关
mysql -uroot -p密码 ==> 测试登录!授权root远程任何机器都能登陆use mysql;update mysql set host='%' where user='root' and host='localhost';flush privileges;或grant all privileges on *.* to 'root@%' identified by '密码' with grant option; flush privileges;
本文出自 “蓝色的天空” 博客,请务必保留此出处http://shurk.blog.51cto.com/1134443/1745524
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: