MySQL数据库优化经验详谈(3)
来源:asp之家 发布时间:2009-12-15 10:34:00
代码:
# 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)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this 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
log_slow_queries= /usr/local/mysql4/logs/slow_query.log
query_cache_type= 1
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 4
#end new config
# 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
# 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


猜你喜欢
- 我们都知道tensorflow框架可以使用tensorboard这一高级的可视化的工具,为了使用tensorboard这一套完美的可视化工具
- 大家都知道在python中,一切皆对象,变量也不再具有类型,变量仅仅是对象的一个引用,我们通常用变量来测类型,通常测得就是被这个变量引用得对
- 近日,有关微软Open XML标准的问题又引发了某些业内人士的关注。其一是因为日前ISO(国际标准组织)成员南非和巴西相继就ISO批准微软的
- 对Vue全家桶有基本的认知.用有node环境了解express一丶业务分析1.什么情况下进行权限验证?访问敏感接口前端向后端敏感接口发送aj
- radians()方法把角度转化为弧度角x。语法以下是radians()方法的语法:radians(x)注意:此函数是无法直接访
- 本文实例讲述了Python基于opencv实现的简单画板功能。分享给大家供大家参考,具体如下:import cv2import numpy
- 本文实例为大家分享了python正则实现计算器功能的具体代码,供大家参考,具体内容如下# -*- coding: utf-8 -*- # A
- 问题现象元素的属性中没有id、name;虽然有class,但比较大众化,且位置也不固定;例如:页码中的下一页;那该如何找到该元素?<a
- 概述主要用于全国地区数据的操作,包括省,市,区 * 联动,地区数据的添加和删除; 在操作地区数据时,以前也用过树形的地区选择组件,但因其在再操
- 不同于其他软件项目,互联网项目的开发有其独有的特性。互联网项目开发不同于传统软件项目开发不同于需求定制性的软件开发公司。客户的需求是明确的,
- 废话不多说了,直接给大家贴代码了,具体代码如下所示:<!DOCTYPE html> <html> <head&
- 以下是详细步骤:1、查看磁盘空间情况:[root@localhost backup]# df -h文件系统 &n
- 本文主要介绍了Opencv图片生成视频,分享给大家,具体如下:生成视频import random as rdimport cv2 as cv
- 一、下载MySQL登录MySQL官网下载MSI Installer:点击“Dnownload”点击“No thanks, just star
- 1、Xmind用例编写规范1:需求大模块2:大模块中的小模块(需要根据需求来看需要多少层)3:用例等级和用例名称用例等级(转换成Excel文
- pycharm每次新建项目都需要重新安装库,解决方法如下:新建项目时自定义选择库(自己安装python位置),不要创建新的(如下图)第一完成
- 当然有,看看下面,你就会明白:<%Sub TimeDelaySeconds(Delay
- 本文实例讲述了Python3.5面向对象编程。分享给大家供大家参考,具体如下:1、面向过程与面向对象的比较(1)面向过程编程(procedu
- 一.Array在Go语言中,数组是一个值类型(value type)所有的值类型变量在赋值和作为参数传递时都将产生一个复制动作如果作为函数的
- 1、先说恢复误删单元格的操作场景:不小心把某个cell给cut了,或者删除了单元格(前提不要关闭notebook窗口)。解决方法: 先按Es