mysql 的默认配置文件 [root@localhost home]# vim /etc/my.cnf# Example MySQL config file for large systems.
#
# This is for a large system with memory = 512M where the system runs mainly
# MySQL.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password= your_password
port= 3306
socket= /tmp/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port= 3306
socket= /tmp/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
# binary logging format - mixed recommended
binlog_format=mixed
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id= 1
# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /mydata/data
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /mydata/data
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 256M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 64M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout

转载于:https://blog.51cto.com/990487026/1697647

my-large.cnf相关推荐

  1. Activiti绩效对决

    每个人在学习Activiti时都会一直问到的问题,与软件开发本身一样古老:"它如何执行?". 到现在为止,当您问我同样的问题时,我将告诉您Activiti如何以各种可能的方式最小化 ...

  2. skip-external-locking skip-locking参数详解

    MySQL的配置文件my.cnf中默认存在一行skip-external-locking的参数,即"跳过外部锁定".根据MySQL开发网站的官方解释,External-lockin ...

  3. Row size too large ( 8126)(解决)

    ERROR 1118 (42000): Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. ...

  4. Packet for query is too large(mysql写入数据过大)

    错误现象:(com.logicaldoc.core.security.dao.HibernateUserDAO: 102) -- Packet for query is too large (1086 ...

  5. Mysql-my-innodb-heavy-4G.cnf配置文件注解

    Mysql-同Nginx等一样具备多实例的特点,简单的讲就是在一台服务器上同时开启多个不同的服务端口(3306,3307)同时运行多个Mysql服务进程,这些服务进程通过不同的socket监听不同的服 ...

  6. mysql my.cnf 配置建议

    /usr/local/share/mysql下面有5个my-xxxx.cnf文件 my-small.cnf 最小配置安装,内存⇐64M,数据数量最少 my-large.cnf 内存=512M my-m ...

  7. Mysql Packet for query is too large解决方法

    2019独角兽企业重金招聘Python工程师标准>>> com.mysql.jdbc.PacketTooBigException: Packet for query is too l ...

  8. mysql large_【转】mysql对large page的支持

    昨天同事问我关于大页内存的事,我也只是有个模糊的概念,从别的博客转过来的,先记录下 在 Linux 操作系统上运行内存需求量较大的应用程序时,由于其采用的默认页面大小为 4KB,因而将会产生较多 TL ...

  9. MySQL报错 Packet for query is too large,server向mysql发送的数据包大小超过mysql限制

    mysql错误提示 Packet for query is too large (3718 > 1024). You can change this value on the server by ...

最新文章

  1. JavaScript对象中的构造方法
  2. Animator窗口视图Project视图PlayerIdleAnimation和PlayerWalkingAnimation
  3. Open source robotics toolkits: use virtual arenas to test your robotics algorithms
  4. SQL Server 和 MySql 语法和关键字的区别
  5. CSDN开播工具-嘉宾端使用说明
  6. 3部世界顶级宇宙纪录片,献给对宇宙万物充满好奇的你~
  7. java安全——类加载器+字节码校验+安全管理器与访问权限
  8. 扫地机器人滤网顺序_1分钟小课堂:扫地机器人滤网多久换一次?
  9. Nginx的开启和关闭
  10. 《自然》发布2022年值得关注的七大科学事件!
  11. 开发中常遇到的linux系统配置操作整理
  12. 一加8系列有望明年二季度发布:配备双曲面打孔屏
  13. SAP License:整理一下最近遇到的问题,给大家分享下
  14. 【CMAKE】指定编译器架构(x86 or x64)
  15. JavaScript前端俄罗斯方块小游戏
  16. 【C语言】printf()函数详解
  17. 超级素数c语言,每个位都为素数
  18. SQL Server 去除节假日天数,获取实际工作日天数
  19. python一键分类文件夹下的文件音乐
  20. 广播电台常用51首背景音乐~甘醇永久

热门文章

  1. linux批量es数据,Elasticsearch批量插入数据
  2. pythonpass函数_有的python内置函数怎么就一个pass?
  3. php接收表单图片,如何在PHP中获取表单图片数据
  4. 构建Chua 混沌电路 - 基本测试
  5. 一键将Word转换为MarkDown
  6. 磁铁驱动反向续流串接电阻的的分析
  7. 信号建模与参数估计作业重新计算
  8. 超详细的Java常用时间操作工具类
  9. 项目管理六大制约因素_知道了这7点,软件项目管理会变得更简单!
  10. html弹出保存文件对话框_这样操作,3分钟不要就可以在GIS office中轻松导入坐标点文件!...