`
xgbjmxn
  • 浏览: 260362 次
  • 性别: 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 配置文件的,有的能对整个系统环境产生影响,例如:/etc/my.cnf。有的则只能影响个别用户,例如:~/.my.cnf。 MySQL读取各个my.cnf配置文件的先后顺序是: /etc/my.cnf /etc/mysql...

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

    在关闭数据库的命令发现mysql关不了,提示Warning: World-writable config file '/etc/my.cnf' is ignored ,大概意思是权限全局可写,任何一个用户都可以写。mysql担心这种文件被其他用户恶意修改,所以忽略掉这个...

    etc文件下mysql的配置文件

    linux下etc文件下mysql的配置文件,详情见博客:http://blog.csdn.net/login_sonata/article/details/53178613

    mysql的/etc/my.cnf

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

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

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

    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...

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

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

    CentOS 7.0编译安装cmake和mysql安装包

    cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld #把Mysql加入系统启动 chmod 755 /etc/init.d/mysqld #增加执行权限 chkconfig mysqld on #加入开机启动 vi /etc/rc.d/init.d/mysqld #编辑 basedir=/...

    mysql授权、启动、启动服务常用命令

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

    LNMP架构安装

    cp support-files/my-medium.cnf /etc/my.cnf cp support-files/mysql.server /etc/init.d/mysqld chmod a+x /etc/rc.d/init.d/mysqld chkconfig --add mysqld ln -s /usr/local/mysql/bin/* /usr/local/bin/ ln -s ...

    大型电商 生产环境的 Mysql配置文件 my.cnf

    某电商网站的生产环境的Mysql配置文件,放入/etc/下面即可

    docker安装mysql主从.txt

    使用allen老师的hub镜像制作自己的mysql主从 ...master配置文件/home/mysql/etc/master/master.cnf slave配置文件/home/mysql/etc/slave/slave.cnf mkdir -p /home/mysql/master-data mkdir -p /home/mysql/slave-data

    mysql配置文件my.cnf

    mysql配置文件my.cnf,经常由于mysql升级后,默认没有此配置文件,上传以备份,根据个人需求,手动修改改文件,放置于/etc/my.cnf处,重启mysql生效

    浅谈Linux 二进制包安装MySQL的一些问题

    第一步:安装相关的依赖yum install perl-Data-Dumper 第二步:初始化mysql数据库的内部信息./scripts/mysql_install_db –...如果安装的好MySQL不能启动,可能是因为系统自带的/etc/my.cnf所引起的! 比如说不能更新pi

    mysql服务启动问题

    mysql服务启动不了问题解决办法,文档描述,主要因数据文件损坏引起。

    Mysql学习笔记

    /etc/mysql/my.cnf $MYSQL_HOME/my.cnf 编译目录下的my.cnf ~/.my.cnf 当Mysql启动的时候会依次读取这几个文件,最终的配置以最后被读到的为准。 安装MySQL会产生5个用户,3个root用户,2个匿名用户。 root@...

    Ubuntu下启动、停止、重启MySQL,查看错误日志命令大全

    1)启动: sudo /etc/init.d/mysql start 2)停止: ...修改 /etc/mysql/my.cnf 在 [client] 下面增加: default-character-set=utf8 或 character_set_server=utf8 在 [mysqld] 下面增加: default-char

    linux mint 下mysql中文支持问题

    mysql配置文件默认放在/etc/my.cnf或者/etc/mysql/my.cnf目录下,进入命令行 sudo gedit /etc/mysql/my.cnf 在[client]下添加default-character-set = utf8 在[mysqld]下添加character-set-server = ut

    Mysql从5.6.14安全升级至mysql5.6.25的方法

    服务器上Mysql的版本为:社区版的mysql-community-server-5.6.14。近日局方对服务器进行漏洞扫描,发现zhyh08上的mysql存在几个高危漏洞,要求进行...3、备份/etc/my.cnf:cp /etc/my.cnf /etc/my.cnf_backup 3、停止

Global site tag (gtag.js) - Google Analytics