Chinaunix首页 | 论坛 | 博客
  • 博客访问: 201500
  • 博文数量: 87
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 840
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-18 21:12
文章分类

全部博文(87)

文章存档

2014年(86)

我的朋友

分类: Mysql/postgreSQL

2014-06-23 16:51:38

my.cnf文件mysql的配置文件

以下是mysql配置文件my.cnf的配置过程

打开my.cnf 文件 命令为: vi  my.cnf

添加以下参数进去:

1> skip-external-locking

2> skip-name-resolve

3> big_tables

4> local_infile = 0                                

5> character-set-server=utf8

6>datadir=/usr/local/mysql/data/

7>basedir=usr/local/mysql/

8> table_cache=16

9> max_connections = 200

10> wait_timeout = 28800

11> interactive_timeout = 28800

12> thread_cache= 30

13> thread_concurrency= 2

14> tmpdir= /usr/local/mysql/tmp/

15> key_buffer = 16M

16> net_retry_count= 10

17> connect_timeout= 10

18> net_read_timeout= 30

19> query_cache_type= 0

20> query_cache_limit = 8MB

21> query_cache_min_res_unit = 4KB

22> query_cache_size = 56M

23> net_write_timeout= 30

24> group_concat_max_len = 999999999

25> interactive-timeout

26> bulk_insert_buffer_size = 2M

27> myisam_sort_buffer_size = 8M

28> read_rnd_buffer_size= 512K

29> join_buffer_size = 64M

30> max_heap_table_size= 20M

31> tmp_table_size= 20M

32> skip-slave-start

33>default-storage-engine = innodb

34> innodb_data_home_dir =

35>innodb_data_file_path=/usr/local/mysql/data/ibdata1:200M;/usr/local/mysql/data/ibdata2:200M:autoextend

36>innodb_log_group_home_dir = /usr/local/mysql/data/

37>innodb_buffer_pool_size=2056M

38>innodb_additional_mem_pool_size=16M

39>innodb_locks_unsafe_for_binlog=1

 

40>innodb_log_files_in_group = 2

41> innodb_log_file_size=256M

42> innodb_log_buffer_size=32M

43> innodb_flush_log_at_trx_commit=2

44> innodb_lock_wait_timeout=50

45> innodb_rollback_on_timeout

46> innodb_checksums=0

47> innodb_support_xa=0

48> innodb_doublewrite=0

49> innodb_thread_concurrency  = 10

50>innodb_concurrency_tickets  = 100

51> transaction-isolation = REPEATABLE-READ 

需要修改的参数有:

1> sort_buffer_size = 16M

2> = 256M

3>write_buffer = 1M

4> server-id=  1016

5> = 2M

6> socket= /usr/local/mysql/tmp/mysql.sock

 

需要删除的参数有:

skip-locking

table_open_cache

binlog_format=mixed

net_buffer_length

 

阅读(1996) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~