centos7 mariadb 安装配置纪录(个人纪录),centos7mariadb
网上有很多教程但不能重头到尾纪录需要各个细节查询,这里自己汇总了下
这里使用的centos7的虚拟机(尽量使用桥接模式,nat模式也行但很有可能不能访问外网)
yum install mariadb-server
这个好像就可以,后面就可以用了(centos7安装mysql的话现在好像默认也是mariadb了)启动mariadb
注:centos7下登录mariadb提示Can’t connect to local MySQL server through socket一般就是数据库没有启动
systemctl start mariadb.service
检查一下启动成功否设置开机自启动
systemctl enable mariadb
这样设置比较简单设置用密码
登录mariadb,在mariadb命令行下
use mysql;
update user set password=password(‘xxx’) WHERE user=’root’;
flush privileges;一下基本信息查询命令
status;–将显示当前mysql的version的各种信息。
select version();–版本信息
show global variables like ‘port’;–端口信息设置允许远程
GRANT ALL PRIVILEGES ON . to ‘root’@’{gateway}’ identified by ‘{password}’ WITH GRANT OPTION;
flush privileges;
此处设置的这里设置网关或者模糊匹配整个网络
这些配置下来基本就够了(防止忘记纪录了自己看的)
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。