存档mysql配置文件

转载 2016年06月01日 15:56:32
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - '/etc/mysql/my.cnf' to set global options,
# - '~/.my.cnf' to set user-specific options.
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain '#' chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
default-character-set=utf8
port        = 3306
socket        = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket        = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld]
#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket        = /var/run/mysqld/mysqld.sock
port        = 3306
basedir        = /usr
datadir        = /var/lib/mysql
collation-server=utf8_general_ci
tmpdir        = /tmp
lc-messages-dir    = /usr/share/mysql
skip-external-locking
character-set-server=utf8
collation-server=utf8_general_ci

#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address        = 127.0.0.1
#
# * Fine Tuning
#
key_buffer        = 16M
max_allowed_packet    = 16M
thread_stack        = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit    = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries    = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id        = 1
#log_bin            = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size         = 100M
#binlog_do_db        = include_database_name
#binlog_ignore_db    = inetc/mysql/my.cnfclude_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI 'tinyca'.
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet    = 16M

[mysql]
#no-auto-rehash    # faster start of mysql but no tab completition

[isamchk]
key_buffer        = 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

vim配置文件,存档

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " 显示相关 ...
  • b_xjie
  • b_xjie
  • 2013年10月15日 22:30
  • 543

linux下查看mysql的配置文件

首先先看看你的mysql在哪,通过which命令which mysql 显示出目录比如我的是下面这个/usr/bin/mysql 接下来就可以针对这个目录通过一些命令查看配置文件在哪了,如下/usr/...
  • tribalElders
  • tribalElders
  • 2016年12月27日 15:34
  • 2280

启动mysql配置文件的启动方式

配置文件加载问题(查看自己使用的哪个配置文件)mysql 配置文件加载位置与顺序: 1./usr/local/mysql/bin/mysqld –verbose –help >help.txt 2>...
  • yeyuyyy
  • yeyuyyy
  • 2016年12月20日 17:09
  • 3130

mysql指定配置文件启动

Windows 步骤: 1、查找my.ini位置,可通过windows服务所对应mysql启动项,查看其对应属性->可执行文件路径,获取my.ini路径。   "D:\M...
  • luxianping
  • luxianping
  • 2017年04月24日 17:00
  • 4422

mysql怎么才能知道用的是哪个配置文件

今天早上一直在找一个东西。 那就是 mysql 怎么才能知道用的是哪个配置文件?也就是my.cnf SHOW VARIABLES; 都没有啊 ps aux | grep mysql root...
  • andyzhaojianhui
  • andyzhaojianhui
  • 2017年03月06日 12:44
  • 2814

mysql查找配置文件的顺序

通过以下命令可以查看mysql 实例启动时,会在哪些位置查找配置文件# mysql --help|grep my.cnf order of preferen...
  • Maikilee_sys
  • Maikilee_sys
  • 2016年06月20日 21:20
  • 786

Java连接Mysql:通过配置文件

1、导入数据库驱动jar包,与及编写数据库配置文件(mysql.properties),mysql.properties放在项目的src目录下[本例使用的数据库为Mysql5.5,数据库驱动jar包为...
  • MRW456
  • MRW456
  • 2015年11月08日 14:06
  • 7771

关于Linux安装mysql默认配置文件位置

在linux下面安装mysql如果在/etc下面没有存在my.cnf配置文件 解决方式如下: 1.通过which mysqld命令来查看mysql的安装位置 2.通过/usr/local...
  • Smile___you
  • Smile___you
  • 2017年01月13日 15:48
  • 14612

mysql配置文件my.cnf详解 ( 主要参数)

mysql配置文件my.cnf详解 ( 主要参数) basedir = path 使用给定目录作为根目录(安装目录)。 character-sets-dir = path 给出存放着字符集...
  • isoleo
  • isoleo
  • 2016年04月25日 09:26
  • 4044

那些你不知道的MySQL配置文件的坑

聊聊MySQL配置。 大多数开发者可能不太会关注MySQL的配置,毕竟在基本配置没有问题的情况下,把更多的精力放在schema设计、索引优化和SQL优化上,是非常务实的策略。这时,如果再花力气去优化...
  • hanerer1314
  • hanerer1314
  • 2017年08月11日 19:34
  • 217
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:存档mysql配置文件
举报原因:
原因补充:

(最多只允许输入30个字)