MySQL配置文件

1. 配置文件路径

  • linux:

    一般放在 /etc/my.cnf,/etc/mysql/my.cnf

  • win:

    一般会在安装目录的根目录 my.ini

2. 配置文件


# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/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]
#数据库表不区分大小写
lower_case_table_names=1
skip-name-resolve
skip-grant-tables

# 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 = /usr/local/mysql
datadir = /usr/local/mysql/data
port = 3306
# server_id = .....
socket = /tmp/mysql.sock
character-set-server = utf8

[mysql]
auto-rehash

results matching ""

    No results matching ""