1G 内存如何优化mysql
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together
with
# other programs (such as a web server)
directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# 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
#socket = /var/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
#socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 128M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
net_buffer_length = 16K
myisam_sort_buffer_size = 1M
max_connections=120
#addnew config
wait_timeout =120
back_log=100
read_buffer_size = 1M
thread_cache=32
skip-innodb
skip-bdb
skip-name-resolve
join_buffer_size=512k
query_cache_size = 32M
interactive_timeout=120
long_query_time=10
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
# 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=, MASTER_PORT= ,
# MASTER_USER=, MASTER_PASSWORD= ;
#
# where you replace , , by quoted strings and
# 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 =
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user =
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port =
#
# binary logging - not required for slaves, but recommended
#log-bin
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000
# Uncomment the following if you are using InnoDB tables
#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
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
1G 内存如何优化mysql相关推荐
- MySQL:8.0 运行在 1G 内存服务上的内存配置
512M 服务器装 MySQL 8.0 不太行,建议最低 1G 内存起. 本人以阿里云性能突发 T5 1G 实例测试安装 MySQL 8.0. 正常安装 MySQL 8.0 后内存占用 42% 左右( ...
- tcmalloc mysql 缓存_Tcmalloc优化Mysql内存管理
实验环境: OS:Redhat 5.3 64bit Mysql:mysql 5.5.29 TCMalloc(Thread-Caching Malloc)与标准glibc库的malloc实现一样的功能, ...
- openshift 3 mysql_最新OpenShift免费空间申请与使用教程-1G内存1G空间支持PHP和MysqL
一.OpenShift空间申请使用前必备工具 1.OpenShift官网: 1.官方网站:https://www.openshift.com/ 2.OpenShift V3:https://manag ...
- mysql tcmalloc_Tcmalloc优化MySQL内存管理
TCMalloc是什么? TCMalloc(Thread-Caching Malloc)与标准glibc库的malloc实现一样的功能,但是TCMalloc在效率和速度效率都比标准malloc高很多. ...
- mysql推荐内存_mysql大内存高性能优化方案
mysql优化是一个相对来说比较重要的事情了,特别像对mysql读写比较多的网站就显得非常重要了,下面我们来介绍mysql大内存高性能优化方案 8G内存下MySQL的优化 按照下面的设置试试看: ke ...
- 最新OpenShift免费空间申请与使用教程-1G内存1G空间支持PHP和MysqL
一.OpenShift空间申请使用前必备工具 1.OpenShift官网: 1.官方网站:https://www.openshift.com/ 2.OpenShift V3:https://manag ...
- Jemalloc优化MySQL、Nginx/Tengine内存管理
Jemalloc源于Jason Evans 2006年在BSDcan conference发表的论文:<A Scalable Concurrent malloc Implementation f ...
- mariadb 内存占用优化
本文由云+社区发表 作者:工程师小熊 摘要:我们在使用mariadb的时候发现有时候不能启动起来,在使用过程中mariadb占用的内存很大,在这里学习下mariadb与内存相关的配置项,对mariad ...
- mysql buffer size_优化mysql之key_buffer_size设置
key_buffer_size key_buffer_size指定索引缓冲区的大小,它决定索引处理的速度,尤其是索引读的速度.通过检查状态值Key_read_requests和Key_reads,可以 ...
- mysql my.cnf key_buffer_size_优化mysql之key_buffer_size设置
key_buffer_size key_buffer_size指定索引缓冲区的大小,它决定索引处理的速度,尤其是索引读的速度.通过检查状态值Key_read_requests和Key_reads,可以 ...
最新文章
- 体系结构方案 -BI 系统的前置计算
- django 的 一对多的关系
- 睡觉时憋气发出“嗯嗯”的声音?
- Find the AFei Numbers
- boost::container模块实现多态向量的测试程序
- node npm nrm nvm gnvm 相爱相杀
- mybatis核心数据结构详解——CacheKey
- spark: 二次排序-1
- 关于计算机Excel中的试题,2015年职称计算机考试EXCEL练习试题及答案
- 《Python黑帽子:黑客与渗透测试编程之道》读书笔记(六):基于github的木马
- 希捷硬盘校准日志分析
- 基于单片机的十字路口交通灯设计(带左转带紧急按钮带调时间)
- 虚拟化安全防护系统部署在安全服务器上,虚拟化安全及解决方案
- 【解决】maven install出现fatal error compiling
- linux拷贝文件夹内所有,linux拷贝文件夹下所有文件
- java编程实现行列式计算应用,行列式算法(java)
- NS 宣布推出两款 Boomer D 类音频子系统
- 活体检测论文研读五:Face De-Spoofing: Anti-Spoofing via Noise Modeling
- 递归:汉罗塔问题的程序实现
- 向右看齐Look Up