• Mysql配置文件读取顺序


    On Unix, Linux and Mac OS X, MySQL programs read startup options from the following files, in the specified order (top items are used first).

    File NamePurpose
    /etc/my.cnf Global options
    /etc/mysql/my.cnf Global options
    SYSCONFDIR/my.cnf Global options
    $MYSQL_HOME/my.cnf Server-specific options
    defaults-extra-file The file specified with --defaults-extra-file=path, if any
    ~/.my.cnf User-specific options
    读取顺序为:
    /etc/my.cnf
    basedir/my.cnf
    datadir/my.cnf
    --defaults-extra-file    #在读取全局配置文件之后,读取用户配置文件(~/.my.cnf)之前,读取extra指定的参数文件
    ~/.my.cnf      #家目录下面的隐藏文件,my.cnf前面的点,说明my.cnf是隐藏文件   
    假设4个配置文件都存在,同时使用--defaults-extra-file指定了参数文件,如果这时有一个 "参数变量"在5个配置文件中都出现了,那么后面的配置文件中的参数变量值 会 覆盖 前面配置文件中的参数变量值,就是说会使用~/.my.cnf中设置的值。
     
    *****注意*****
       如果使用./bin/mysqld_safe 守护进程启动mysql数据库时,使用了 --defaults-file=<配置文件的绝对路径>参数,这时只会使用这个参数指定的配置文件。
  • 相关阅读:
    Android Fragment和FragmentActivity区别和用法
    百度地图
    test
    Activity的跳转与传值
    判断Android应用是否安装、运行
    爬取当当网 Top 500 本五星好评书籍
    TED-WordCloud: 4000+视频标题词云分析
    记第一个爬虫
    requests-html简介
    用requests-html爬取7000+PDF
  • 原文地址:https://www.cnblogs.com/yangliheng/p/6475079.html
Copyright © 2020-2023  润新知