BMS-HOSxP Community

HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: nahos ที่ มกราคม 12, 2010, 08:48:04 AM

หัวข้อ: ช่วยแก้ my.cnf RAM 6 GB. ให้หน่อยครับ
เริ่มหัวข้อโดย: nahos ที่ มกราคม 12, 2010, 08:48:04 AM
พอดีลง ubuntu 9.10 ครับ
ลอง copy my.cnf จากในเวบไปทับแล้วมัน run mysql ไม่ได้ครับ

จึงแนบไฟล์ my.cnf ตัวเดิมที่ รันได้มาให้
ช่วยแก้ให้เหมาะสมกับการใช้งานกับ hosxp หน่อยครับ
ram 6 gb. ครับ

ขอบคุณครับ
หัวข้อ: Re: ช่วยแก้ my.cnf ให้หน่อยครับ
เริ่มหัวข้อโดย: James011 ที่ มกราคม 12, 2010, 09:48:01 AM
 ;D ;D ลองดูครับ
หัวข้อ: Re: ช่วยแก้ my.cnf ให้หน่อยครับ
เริ่มหัวข้อโดย: James011 ที่ มกราคม 12, 2010, 10:04:24 AM
              ;D ;D ;D copy ไปวางแล้ว
 ;D ;D ;D  chmod  744  /etc/mysql/my.cnf   ด้วยนะครับ
หัวข้อ: Re: ช่วยแก้ my.cnf ให้หน่อยครับ
เริ่มหัวข้อโดย: nahos ที่ มกราคม 12, 2010, 11:05:37 AM
ขอบคุณครับ

ถ้า เปิด
innodb_locks_unsafe_for_binlog = 1
innodb_adaptive_checkpoint = 1
innodb_io_capacity = 10000
innodb_write_io_threads = 16
innodb_read_io_threads = 16

จะรันไม่ได้ครับ ก็เลยปิดไว้มีผลอะไรไหมครับ
หัวข้อ: Re: ช่วยแก้ my.cnf ให้หน่อยครับ
เริ่มหัวข้อโดย: James011 ที่ มกราคม 12, 2010, 11:23:05 AM
 ;D ;D ;D Comment สีแดง  สำหรับ Percona ครับ   ;D ;D
[client]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
default-character-set=tis620

[mysqld]
default_storage_engine=INNODB
default_table_type = INNODB
port      = 3306
socket      = /var/lib/mysql/mysql.sock
skip-locking
back_log = 50
key_buffer =512M
max_allowed_packet = 1024M
binlog_cache_size = 1M
table_cache = 1500
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
join_buffer_size = 8M
bulk_insert_buffer_size = 16M
max_heap_table_size = 1024M
myisam_sort_buffer_size = 512M
myisam_max_sort_file_size = 1024M
myisam_max_extra_sort_file_size = 1024M
myisam_repair_threads = 1
myisam_recover
thread_cache_size = 1000
query_cache_size= 1024M
thread_cache_size = 8
thread_concurrency = 8
default-character-set=tis620
max_connections = 2000
max_connect_errors = 10
skip-name-resolve
skip-character-set-client-handshake
init_connect = 'SET NAMES tis620'
ft_min_word_len = 4
thread_stack = 192K
transaction_isolation = REPEATABLE-READ
tmp_table_size = 16M
log-bin=mysql-bin
log_bin_trust_function_creators = 1
binlog_format=mixed
slow_query_log
long_query_time = 2
log_long_format
innodb_file_per_table
innodb_data_home_dir = /var/lib/mysql/
#interactive_timeout = 600
#wait_timeout = 1200
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_files_in_group = 3
innodb_log_group_home_dir = /var/lib/mysql/
innodb_max_dirty_pages_pct = 90
innodb_doublewrite = 0
#############################   mysql 5.1.X
#innodb_log_arch_dir = /var/lib/mysql/
#############################
innodb_buffer_pool_size = 3072M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 500M
innodb_log_buffer_size = 8M
innodb_file_io_threads = 4
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 0
innodb_fast_shutdown = 0
innodb_flush_method = O_DIRECT
innodb_doublewrite = 0
innodb_file_io_threads = 4
innodb_lock_wait_timeout = 2000
innodb_support_xa = 0
innodb_locks_unsafe_for_binlog = 1
#innodb_adaptive_checkpoint = 1       ##### percona
#innodb_io_capacity = 10000   ##### percona
#innodb_write_io_threads = 16  ##### percona
#innodb_read_io_threads = 16  ##### percona
innodb_checksums = 0
innodb_max_dirty_pages_pct = 15
table_open_cache = 8000
low_priority_updates = 1

#[xtrabackup]  ##### percona
#target_dir=/mysqlbackup  ##### percona
#datadir=/var/lib/mysql   ##### percona

[mysqldump]
quick
max_allowed_packet = 1024M
allow-keywords

[mysql]
no-auto-rehash
default-character-set=tis620

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 400M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
open-files-limit = 8192

 

หัวข้อ: Re: ช่วยแก้ my.cnf ให้หน่อยครับ
เริ่มหัวข้อโดย: มนตรี บอยรักยุ้ยคนเดียว ที่ มกราคม 12, 2010, 11:30:21 AM
;D ;D ;D Comment สีแดง  สำหรับ Percona ครับ   ;D ;D
[client]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
default-character-set=tis620

[mysqld]
default_storage_engine=INNODB
default_table_type = INNODB
port      = 3306
socket      = /var/lib/mysql/mysql.sock
skip-locking
back_log = 50
key_buffer =512M
max_allowed_packet = 1024M
binlog_cache_size = 1M
table_cache = 1500
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
join_buffer_size = 8M
bulk_insert_buffer_size = 16M
max_heap_table_size = 1024M
myisam_sort_buffer_size = 512M
myisam_max_sort_file_size = 1024M
myisam_max_extra_sort_file_size = 1024M
myisam_repair_threads = 1
myisam_recover
thread_cache_size = 1000
query_cache_size= 1024M
thread_cache_size = 8
thread_concurrency = 8
default-character-set=tis620
max_connections = 2000
max_connect_errors = 10
skip-name-resolve
skip-character-set-client-handshake
init_connect = 'SET NAMES tis620'
ft_min_word_len = 4
thread_stack = 192K
transaction_isolation = REPEATABLE-READ
tmp_table_size = 16M
log-bin=mysql-bin
log_bin_trust_function_creators = 1
binlog_format=mixed
slow_query_log
long_query_time = 2
log_long_format
innodb_file_per_table
innodb_data_home_dir = /var/lib/mysql/
#interactive_timeout = 600
#wait_timeout = 1200
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_files_in_group = 3
innodb_log_group_home_dir = /var/lib/mysql/
innodb_max_dirty_pages_pct = 90
innodb_doublewrite = 0
#############################   mysql 5.1.X
#innodb_log_arch_dir = /var/lib/mysql/
#############################
innodb_buffer_pool_size = 3072M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 500M
innodb_log_buffer_size = 8M
innodb_file_io_threads = 4
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 0
innodb_fast_shutdown = 0
innodb_flush_method = O_DIRECT
innodb_doublewrite = 0
innodb_file_io_threads = 4
innodb_lock_wait_timeout = 2000
innodb_support_xa = 0
innodb_locks_unsafe_for_binlog = 1
#innodb_adaptive_checkpoint = 1       ##### percona
#innodb_io_capacity = 10000   ##### percona
#innodb_write_io_threads = 16  ##### percona
#innodb_read_io_threads = 16  ##### percona
innodb_checksums = 0
innodb_max_dirty_pages_pct = 15
table_open_cache = 8000
low_priority_updates = 1

#[xtrabackup]  ##### percona
#target_dir=/mysqlbackup  #####percona
#datadir=/var/lib/mysql   ##### percona

[mysqldump]
quick
max_allowed_packet = 1024M
allow-keywords

[mysql]
no-auto-rehash
default-character-set=tis620

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 400M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
open-files-limit = 8192

 

ชอบใช้ my.cnf แบบไม่รู้กัน หลายคน
คนที่รับไป ก็มาแจกแบบผิดๆกัน
ทำให้ระบบ ทำงานไม่ได้ และแบบไม่รู้เรื่อง กรุณาทำความเข้าใจใหม่นะครับ

#[xtrabackup]  ##### xtrabackup
#target_dir=/mysqlbackup  ##### xtrabackup
#datadir=/var/lib/mysql   ##### xtrabackup

หัวข้อ: Re: ช่วยแก้ my.cnf ให้หน่อยครับ
เริ่มหัวข้อโดย: nahos ที่ มกราคม 12, 2010, 12:58:22 PM
ขอบคุณครับเข้าใจละ

แต่
percona คืออะไรครับ
 จำเป็นไหม
 ที่เราต้องใช้ percona

ก็ผมไม่รู้เรื่องนี่นา
หัวข้อ: Re: ช่วยแก้ my.cnf ให้หน่อยครับ
เริ่มหัวข้อโดย: มนตรี บอยรักยุ้ยคนเดียว ที่ มกราคม 12, 2010, 19:52:56 PM
ขอบคุณครับเข้าใจละ

แต่
percona คืออะไรครับ
 จำเป็นไหม
 ที่เราต้องใช้ percona

ก็ผมไม่รู้เรื่องนี่นา

ลอง ค้นหาใน google หรือใน hosxp มีคำตอบอยู่แล้ว
เอาไปใช้ต้องศึกษาก่อนใช้บ้าง ว่าเขาแจกใช้กับอะไร

บอกว่าไม่รู้ ไม่ใช่คำตอบ ที่ดีนัก

หัวข้อ: Re: ช่วยแก้ my.cnf ให้หน่อยครับ
เริ่มหัวข้อโดย: icon_teams ที่ มกราคม 13, 2010, 10:50:35 AM
หาก อ.บอยกรุณาก็ทำคู่มือ config Mysql แจกก็คงดี..ได้เปล่าน้อ.. ;D
หัวข้อ: Re: ช่วยแก้ my.cnf ให้หน่อยครับ
เริ่มหัวข้อโดย: มนตรี บอยรักยุ้ยคนเดียว ที่ มกราคม 13, 2010, 19:53:30 PM
หาก อ.บอยกรุณาก็ทำคู่มือ config Mysql แจกก็คงดี..ได้เปล่าน้อ.. ;D

อยากจะทำอยู่ แต่ความรู้ความสามารถคงไม่ถึง

copy จากของเมืองนอก อ่านเข้าใจบาง ไม่เข้าใจบาง

แต่ผมใช้ประสบการณ์จากการลง server มาและอ่านบน web ต่างๆ
ส่วนใหญ่ จะได้จาก อ.ชัยพร และ อ.ขวด เป็นส่วนใหญ่ ได้จาก พี่โก้ในบางส่วน

web ที่ผมอ่านก็มี www.google.co.th,www.mysql.com แล้วหาค่าที่ใช้
และข้างใต้ชื่อผมก็มีให้อ่านหลาย web สำหรับ config Mysql
แต่หาคนที่มาอ่านน้อยมาก
หัวข้อ: Re: ช่วยแก้ my.cnf ให้หน่อยครับ
เริ่มหัวข้อโดย: udomchok ที่ มกราคม 13, 2010, 20:03:51 PM
อยากจะทำอยู่ แต่ความรู้ความสามารถคงไม่ถึง

copy จากของเมืองนอก อ่านเข้าใจบาง ไม่เข้าใจบาง

แต่ผมใช้ประสบการณ์จากการลง server มาและอ่านบน web ต่างๆ
ส่วนใหญ่ จะได้จาก อ.ชัยพร และ อ.ขวด เป็นส่วนใหญ่ ได้จาก พี่โก้ในบางส่วน

web ที่ผมอ่านก็มี www.google.co.th,www.mysql.com แล้วหาค่าที่ใช้
และข้างใต้ชื่อผมก็มีให้อ่านหลาย web สำหรับ config Mysql
แต่หาคนที่มาอ่านน้อยมาก
อ.บอย โม้แล้วครับ


จะมาได้จากผมบางส่วนได้'ไง ผมต่างหากที่ต้องพึ่ง อ.บอย ในเรื่องนี้
แหม...ถล่มตัวซะ...(ได้ข่าวว่าถึงกับเกิดแผ่นดินไหว ทำเนียบประธานาธิบดีพังเลยนะเนี่ย.....ที่ไฮติน่ะ  ;D ;D ;D ;D ;D )
หัวข้อ: MySQL Enterprise Solutions
เริ่มหัวข้อโดย: มนตรี บอยรักยุ้ยคนเดียว ที่ มกราคม 13, 2010, 20:28:04 PM
เอามาฝาก

Product Description

With more than three million users, MySQL is the most popular open-source database server in the world, providing an extremely fast, reliable, and inexpensive alternative to commercial database management systems
Gives corporate users a complete guide to building enterprise-level database applications with MySQL
Covers the pros and cons of adopting MySQL and installing, testing, and configuring the MySQL server
Written by one of the lead programmers of the MySQL product and reviewed by Monty Widenius, the creator of MySQL
Companion Web site includes all code examples as well as links to useful online resources

http://rapidshare.com/files/156350894/MySQL_Enterprise.rar
http://uploading.com/files/get/7b719a19/
หัวข้อ: Re: ช่วยแก้ my.cnf RAM 6 GB. ให้หน่อยครับ
เริ่มหัวข้อโดย: nahos ที่ มกราคม 30, 2010, 15:29:29 PM
แบบนี้พอได้ไหมครับ ช่วยดูให้หน่อยครับ
ขอบคุณอาจารย์ทุก ๆ ท่านที่ช่วยดูครับ


ใช้กับ MySQL-5.4.1-1.percona.b1.x86_64.rpm   

 my.cnf for RAM 6 GB.   ครับ


[client]

port      = 3306

socket      = /var/lib/mysql/mysql.sock

default-character-set=tis620



[mysqld]

default_storage_engine=INNODB

default_table_type = INNODB

port      = 3306

socket      = /var/lib/mysql/mysql.sock

skip-locking

back_log = 50

key_buffer =512M

max_allowed_packet = 1024M

binlog_cache_size = 1M

table_cache = 1500

sort_buffer_size = 2M

read_buffer_size = 2M

read_rnd_buffer_size = 8M

join_buffer_size = 8M

bulk_insert_buffer_size = 16M

max_heap_table_size = 1024M

myisam_sort_buffer_size = 512M

myisam_max_sort_file_size = 1024M

myisam_max_extra_sort_file_size = 1024M

myisam_repair_threads = 1

myisam_recover

thread_cache_size = 1000

query_cache_size= 1024M

thread_cache_size = 8

thread_concurrency = 8

default-character-set=tis620

max_connections = 2000

max_connect_errors = 10

skip-name-resolve

skip-character-set-client-handshake

init_connect = 'SET NAMES tis620'

ft_min_word_len = 4

thread_stack = 192K

transaction_isolation = REPEATABLE-READ

tmp_table_size = 16M

log-bin=mysql-bin

log_bin_trust_function_creators = 1

binlog_format=mixed

slow_query_log

long_query_time = 2

log_long_format


# *** INNODB Specific options ***
#skip-innodb
innodb_file_per_table

innodb_additional_mem_pool_size = 20M
innodb_buffer_pool_size = 3024M
innodb_data_file_path = ibdata1:10M:autoextend
innodb_data_home_dir = /var/lib/mysql/
innodb_io_capacity = 10000
innodb_write_io_threads = 16
innodb_read_io_threads = 16
#innodb_file_io_threads = 4
#innodb_force_recovery=1
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 0
#innodb_fast_shutdown
innodb_log_buffer_size = 8M
innodb_log_file_size = 134217728
innodb_log_files_in_group = 3
innodb_log_group_home_dir = /var/lib/mysql/
innodb_max_dirty_pages_pct = 90
innodb_doublewrite = 0
innodb_flush_method=O_DSYNC
innodb_lock_wait_timeout = 2000
innodb_support_xa = 0
table_open_cache = 8000

low_priority_updates = 1

#[xtrabackup]

#target_dir=/mysqlbackup

#datadir=/var/lib/mysql

[mysqldump]
quick

max_allowed_packet = 1024M

allow-keywords

[mysql]
no-auto-rehash
default-character-set=tis620

# Only allow UPDATEs and DELETEs that use keys.
#safe-updates

[isamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M

[myisamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
open-files-limit = 8192