zoukankan      html  css  js  c++  java
  • 安装mariadb并修改配置文件

    实验环境:CentOS7

    #安装mariadb-server包
    #修改mariadb配置文件/etc/my.cnf.d/server.cnf
    #添加 skip_name_resolve=ON  #不执行将IP解析成主机名
    #添加 innodb_file_per_table=ON  #每个innodb表单独的表空间
    [root@~ localhost]#yum -y install mariadb-server [root@~ localhost]#vi /etc/my.cnf.d/server.cnf # # These groups are read by MariaDB server. # Use it for options that only the server (but not clients) should see # # See the examples of server my.cnf files in /usr/share/mysql/ # # this is read by the standalone daemon and embedded servers [server] # this is only for the mysqld standalone daemon [mysqld] skip_name_resolve=ON innodb_file_per_table=ON
    log_bin=mysql-bin #二进制日志
    #查看服务的状态,mariadb.service监听端口3306
    [root@~ localhost]#systemctl status mariadb.service ● mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Active: active (running) since 星期六 2017-06-03 08:19:01 CST; 2h 1min ago [root@~ localhost]#ss -ntl|grep "3306" LISTEN 0 50 *:3306 *:*

     首次安装完成mariadb-server包后,启动mariadb.service,必须加固数据库,执行

    [root@~ localhost]#mysql_secure_installation

    请点击http://www.cnblogs.com/wzhuo/p/6936358.htm 。

  • 相关阅读:
    IP地址分类
    HTTP协议基础
    PHP中md5()函数绕过
    支付宝转账
    前端常用小工具
    防抖和节流
    分模块简单使用vuex
    vue-cli 2+antd定制主题
    浅谈Promise
    vue中用js实现文件上传和文件下载
  • 原文地址:https://www.cnblogs.com/wzhuo/p/6936476.html
Copyright © 2011-2022 走看看