zoukankan      html  css  js  c++  java
  • mysql数据库配置文件

    一、数据库配置文件

    数据库配置文件是很一个很强大的功能,这是数据库管理员经常需要关注的配置文件。

    • my.ini  #这是在windows下的配置文件名称。
    • my.conf  #这是在linux下的配置文件名称。

    my.ini原文件代码:

    # For advice on how to change settings please see
    # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
    # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
    # *** default location during install, and will be replaced if you
    # *** upgrade to a newer version of MySQL.
    
    [mysqld]
    
    # Remove leading # and set to the amount of RAM for the most important data
    # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
    # innodb_buffer_pool_size = 128M
    
    # Remove leading # to turn on a very important data integrity option: logging
    # changes to the binary log between backups.
    # log_bin
    
    # These are commonly set, remove the # and set as required.
    # basedir = .....
    # datadir = .....
    # port = .....
    # server_id = .....
    
    
    # Remove leading # to set options mainly useful for reporting servers.
    # The server defaults are faster for transactions and fast SELECTs.
    # Adjust sizes as needed, experiment to find the optimal values.
    # join_buffer_size = 128M
    # sort_buffer_size = 2M
    # read_rnd_buffer_size = 2M 
    
    sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
    

    my.ini修改后代码:

    # For advice on how to change settings please see
    # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
    # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
    # *** default location during install, and will be replaced if you
    # *** upgrade to a newer version of MySQL.
    
    [mysqld]
    character-set-server = utf8
    # Remove leading # and set to the amount of RAM for the most important data
    # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
    # innodb_buffer_pool_size = 128M
    
    # Remove leading # to turn on a very important data integrity option: logging
    # changes to the binary log between backups.
    # log_bin
    
    # These are commonly set, remove the # and set as required.
    basedir = c:/mysql
    datadir = c:/mysql/data
    port = 3306
    # 这是主从数据库的ID,所以这个ID不能重复
    server_id = 1
    
    
    # Remove leading # to set options mainly useful for reporting servers.
    # The server defaults are faster for transactions and fast SELECTs.
    # Adjust sizes as needed, experiment to find the optimal values.
    # join_buffer_size = 128M
    # sort_buffer_size = 2M
    # read_rnd_buffer_size = 2M 
    
    sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
    

      

     

  • 相关阅读:
    springboot idea新建工程Initialization failed for 'https://start.spring.io' Please check URL, network and proxy settings
    TCP的三次握手与四次挥手理解及面试题
    lambda用法
    深入理解HashMap的扩容机制
    数据库连接池性能测试对比
    SQL
    AOP实现的统一日志处理
    阿里面试1
    汇总
    如果使用association和collection实现层级查询
  • 原文地址:https://www.cnblogs.com/orna/p/8289053.html
Copyright © 2011-2022 走看看