欢迎投稿

今日深度:

centos7 mariadb 安装配置纪录(个人纪录),centos7mariadb

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;
    此处设置的这里设置网关或者模糊匹配整个网络
    这些配置下来基本就够了(防止忘记纪录了自己看的)
  • www.htsjk.Com true http://www.htsjk.com/mariadb/32843.html NewsArticle centos7 mariadb 安装配置纪录(个人纪录),centos7mariadb 网上有很多教程但不能重头到尾纪录需要各个细节查询,这里自己汇总了下 这里使用的centos7的虚拟机(尽量使用桥接模式,nat模式也...
    相关文章
      暂无相关文章
    评论暂时关闭