`
xgbjmxn
  • 浏览: 268600 次
  • 性别: Icon_minigender_1
  • 来自: 新乡
社区版块
存档分类
最新评论

/etc/mysql/my.cnf

阅读更多
#
# 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]
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
#

#
# * IMPORTANT
#   If you make changes to these settings and your system uses apparmor, you may
#   also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
#

user = mysql
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
skip-external-locking
#
# 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

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 = include_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/
分享到:
评论

相关推荐

    MySQL中配置文件my.cnf因权限问题导致无法启动的解决方法

    本文主要给大家介绍了关于MySQL中配置文件my.cnf因权限问题导致无法启动的相关解决过程,分享出来供大家参考学习,下面来一起看看详细的介绍: 问题描述 MySQL 无法启动,报如下错误: 问题分析 查看 MySQL 错误...

    Mysql 教程 - MySql 配置修改.pdf

    sudo cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf ``` 然后,使用文本编辑器打开my.cnf文件,并修改相应的配置参数。 配置文件的优先级 MySQL的配置文件有多个,优先级从高到低分别是: 1. ~...

    etc文件下mysql的配置文件

    MySQL的主配置文件一般被称为`my.cnf`或`my.ini`,在Linux系统中通常是`my.cnf`。这个文件包含了启动参数、连接设置、存储引擎配置、性能调整等多个方面的内容。配置文件的结构分为多个部分,每个部分以`[section]`...

    MySQL无法重启报错Warning: World-writable config file ‘/etc/my.cnf’ is ignored的解决方法

    在使用MySQL数据库时,我们可能会遇到这样一个问题:尝试重启MySQL服务时,系统返回"Warning: World-writable config file '/etc/my.cnf' is ignored"的错误提示,这意味着MySQL配置文件`my.cnf`的权限设置不正确,...

    MySQL中my.cnf文件选项

    `my.cnf`文件是MySQL服务端的核心配置文件之一,它通常位于系统的特定目录下(例如Linux系统中通常位于`/etc/mysql/my.cnf`或`/etc/my.cnf`)。此文件包含一系列的配置选项,这些选项决定了MySQL服务器的行为特性。...

    mysql的/etc/my.cnf

    linux下安装mysql时的my.cnf文件,其路径为/etc/my.cnf,如果安装路径为/home/envir/mysql则该文件可以不做修改,直接丢下去或覆盖;

    linux下mysql配置文件my.cnf详解.pdf

    `my.cnf`文件通常位于`/etc/my.cnf`或`/etc/mysql/my.cnf`,但具体位置可能因发行版和安装方式而异。文件由多个节(section)组成,如 `[mysqld]`、`[mysqldump]` 和 `[client]`,每个节内的配置适用于相应的MySQL...

    Linux 安装mysql8详细教程.doc

    3. /usr/local/mysql/etc/my.cnf 4. ~/.my.cnf PATH变量配置 为了避免在使用MySQL时总是必须键入客户端程序的路径名,可以将/usr/local/mysql/bin目录添加到PATH变量中: `export PATH=$PATH:/usr/local/mysql8/...

    MySQL修改my.cnf配置不生效的解决方法

    1. 确保你修改的是正确路径下的`my.cnf`,通常是`/etc/my.cnf`或`/etc/mysql/my.cnf`。 2. 如果你有特定的配置需求,可以考虑在用户目录下创建`~/.my.cnf`,这样只会影响到当前用户的MySQL客户端。 3. 使用`--...

    修改my.cnf之后启动mysql出错(完美解决).docx

    my.cnf 文件通常位于 /etc/mysql/ 目录下。 MySQL 启动错误的原因 MySQL 启动错误可能是由于多种原因引起的,例如: 1. 配置文件 my.cnf 的修改不当,导致 MySQL 服务器无法正确启动。 2. MySQL 服务器的进程 ID ...

    Mysql启动的方式(四种)

    启动mysql服务器:./mysqld –defaults-file=/etc/my.cnf –user=root 客户端连接: mysql --defaults-file=/etc/my.cnf or mysql -S /tmp/mysql.sock 2、mysqld_safe 启动mysql服务器:./mysqld_safe –defaults-file...

    查看linux服务器上mysql配置文件路径的方法

    在类NUIX的系统中,配置文件的位置一般在/etc/my.cnf 或者 /etc/MySQL/my.cnf 我们见过有些人尝试修改配置文件但是不生效,因为他们修改的并不是服务器读取的文件。例如Debian下,/etc/mysql/my.cnf才是MySQL读取的...

    MySQL 5.6 my.cnf 配置

    在这个版本中,`my.cnf`通常位于系统的配置目录下,如Linux系统中的`/etc/mysql/my.cnf`。 ### `my.cnf`的基本结构 `my.cnf`文件由多个部分组成,每个部分以大写字母的 `[section]` 开头,例如 `[mysqld]`、`...

    Linux-修改-Mysql-数据库-存放路径

    这是由MySQL配置文件(通常为`/etc/my.cnf`或`/etc/mysql/my.cnf`)中的`datadir`参数指定的。 #### 知识点二:创建新的数据文件存放目录 1. **新建数据目录**:首先,我们需要在新位置创建用于存放MySQL数据文件...

    mysql 主从文件配置,my.cnf

    这是MySQL服务器的默认配置文件,通常位于系统的/etc/my.cnf或者/etc/mysql/my.cnf路径下,用于设置MySQL服务器的启动参数和各种配置选项。在主从复制中,我们需要关注以下几个关键参数: 1. **server-id**:这是每...

    centos安装mysql5.7.docx

    1. 修改`/etc/mysql/my.cnf`,在`[mysqld]`部分添加`bind-address = 0.0.0.0`,允许所有IP访问。 2. 更新`mysql.user`表,允许root用户远程登录。 最后,启动MySQL服务并检查运行状态: 1. 使用`/etc/init.d/mysql ...

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

    在linux下面安装mysql如果在/etc下面没有存在my.cnf配置文件 解决方式如下: 1.通过which mysqld命令来查看mysql的安装位置 2.通过/usr/local/mysql/bin/mysqld –verbose –help |grep -A 1 ‘Default options’...

    mysql 查看当前使用的配置文件my.cnf的方法(推荐)

    4. `/etc/mysql/my.cnf` 5. `/usr/local/etc/my.cnf` 6. 用户家目录下的`~/.my.cnf` 要查看MySQL默认的配置文件搜索路径,可以运行: ``` mysql --help | grep 'my.cnf' ``` 这将显示配置文件的搜索顺序。 当需要...

Global site tag (gtag.js) - Google Analytics