ผู้เขียน หัวข้อ: อาจารย์และพี่ ๆ ช่วยดู my.cnf ช่วยด่วนเลยครับ  (อ่าน 5183 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ komanp

  • Sr. Member
  • ****
  • กระทู้: 375
  • Respect: 0
    • ดูรายละเอียด
ตอนโอนข้อมูลไป slave มันขึ้นว่า
person_image ตั้งค่าน้อยเกินไป อยากได้มากกว่านี้ ที่แปลได้นะครับ
อีกตัวมันขึ้นว่า max_allowed_packet กำหนดให้แล้วตั้ง 512M มันน้อยไปหรือเปล่าทำไมขึ้นแบบนี้
แรม 4GB ครับ
จะเริ่มเดินทางไปบรรจุพรุ่งนี้แล้ว แต่ยังเครียร์server ไม่เสร็จเลย รบกวนด่วนเลยครับ


#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port      = 3306
socket      = /var/run/mysqld/mysqld.sock
default-character-set=tis620
# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket      = /var/run/mysqld/mysqld.sock
nice      = 0
open-files-limit=8192

[mysqld]
#
# * Basic Settings
#

#
# * IMPORTANT
#   If you make changes to these settings and your system uses apparmor, you may
#   also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
#
default_storage_engine=INNODB
default_table_type=INNODB
user      = mysql
socket      = /var/run/mysqld/mysqld.sock
port      = 3306
basedir      = /usr
datadir      = /var/lib/mysql
tmpdir      = /tmp
skip-external-locking
back_log=50
key_buffer=512
binlog_cache_size=1M
table_cache=1500
sort_buffer_size = 1M
read_buffer_size=1M
read_rnd_buffer_size=1M
join_buffer_size=4M
bulk_insert_buffer_size=32
myisam_sort_buffer_size=512
myisam_max_sort_file_size=512
myisam_max_extra_sort_file_size=512M
myisam_repair_threads=1
myisam_recover
thread_cache_size=1500
query_cache_size=512M
thread_cache_size=8
thread_concurrency=8
default-character-set=tis620
skip-locking
skip-name-resolve
skip-character-set-client-handshake
skip-federated
init_connect = 'SET NAMES tis620'
ft_min_word_len=4
thread_stack=192k
transaction_isolation=REPEATABLE-READ
tmp_table_size=32
log_bin_trust_function_creators=1
slow_query_log
long_query_time=2
log_long_format
innodb_file_per_table
innodb_data_home_dir=/var/lib/mysql/
innodb_data_file_path=ibdata1:10M:autoextend
innodb_log_group_home_dir=/var/lib/mysql
innodb_max_dirty_pages_pct=90
innodb_doublewrite=0
innodb_buffer_pool_size=2400M
#innodb_additional_mem_pool_size=1638M
innodb_log_buffer_size=2
innodb_thread_concurrency=16
innodb_flush_log_at_trx_commit=1
innodb_flush_method=O_DSYNC
innodb_lock_wait_timeout=50
innodb_thread_concurrency=0
innodb_support_xa=0
innodb_locks_unsafe_for_binlog=1
#innodb_io_capacity=10000
#innodb_write_io_threads=16
#innodb_read_io_threads=16
innodb_force_recovery=4
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address      = 192.168.2.222
#
# * Fine Tuning
#
max_connect_errors=10
max_heap_table_size=512M
max_allowed_packet   = 512M
thread_stack      = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
max_connections        = 1500
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit   = 2M
query_cache_size        = 350M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1

log_error                = /var/log/mysql/error.log

# Here you can see queries with especially long duration
#log_slow_queries   = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id      = 1
#log_bin         = /var/log/mysql/mysql-bin.log
expire_logs_days   = 10
max_binlog_size         = 100M
#binlog_do_db      = include_database_name
#binlog_ignore_db   = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet   = 512M
allow-keywords

[mysql]
no-auto-rehash   
default-character-set=tis620
# faster start of mysql but no tab completition

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

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

[mysqlhotcopy]
interactive-timeout
#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
komanp_msu2004@hotmail.com
Server ubuntu 8.10 64 Bit Mysql 5.0.67    ram 2 GB  raid 5
3.52.8.30

ออฟไลน์ มดตานอย ครับ..

  • Hero Member
  • *****
  • กระทู้: 3,137
  • Respect: 0
    • ดูรายละเอียด
Re: อาจารย์และพี่ ๆ ช่วยดู my.cnf ช่วยด่วนเลยครับ
« ตอบกลับ #1 เมื่อ: กรกฎาคม 28, 2011, 09:41:51 AM »
0
format ติดตั้งใหม่เลยครับ   oracle linux 6.1+percona-server 5.5.13

Nakhonphanom Hospital

MR.Tanoy999 ผู้ใช้งานทั่วไป
tanoy999-at-gmail-dot-com
เริ่ม  1 ตุลาคม 2549  โดย  BMS

ออฟไลน์ Khuad

  • Hero Member
  • *****
  • กระทู้: 3,778
  • .. นางฟ้า ตัวไม่น้อยแล้ว ..
  • Respect: +10
    • ดูรายละเอียด
Re: อาจารย์และพี่ ๆ ช่วยดู my.cnf ช่วยด่วนเลยครับ
« ตอบกลับ #2 เมื่อ: กรกฎาคม 28, 2011, 10:08:40 AM »
0

ตอนโอนข้อมูลไป slave มันขึ้นว่า
person_image ตั้งค่าน้อยเกินไป อยากได้มากกว่านี้ ที่แปลได้นะครับ
อีกตัวมันขึ้นว่า max_allowed_packet กำหนดให้แล้วตั้ง 512M มันน้อยไปหรือเปล่าทำไมขึ้นแบบนี้
แรม 4GB ครับ
จะเริ่มเดินทางไปบรรจุพรุ่งนี้แล้ว แต่ยังเครียร์server ไม่เสร็จเลย รบกวนด่วนเลยครับ



... ไปตรวจสอบดู ค่าของ  max_allowed_packet ใน section [mysqldump] 
    ที่ไฟล์  my.ini ที่อยู่ใน C:\Windows ของเครื่องใช้โอนข้อมูลด้วยครับ(ไม่ใช่ my.cnf ที่เครื่อง server นะครับ)

    ใช้กำหนดสัก 1024M ก็ได้ครับ  เพราะถ้าไม่เคยแก้ไขมาก่อน ค่าของมันจะแค่ 16M   ที่ผมเคยตั้งไว้ 512M ก็ยังทำไม่ผ่านเลยครับ ...  :D ....
โรงพยาบาลวังน้อย   พระนครศรีอยุธยา ( รพช.30 เตียง )
Server : ProLiant DL120G6  Xeon X3450  RDIMM 12 Gb  2x256GB SSD Raid 1
OS : CentOS 6.3  DB : Percona 5.5.21

Slave : ProLiant ML110G6  Xeon X3430  UDIMM 8 Gb  2x300GB SAS Raid 1
OS : CentOS 6.3  DB : Percona 5.5.32

HOSxP version  3.57.xx.xx    เริ่มระบบ  เมษายน 2549

ออฟไลน์ Khuad

  • Hero Member
  • *****
  • กระทู้: 3,778
  • .. นางฟ้า ตัวไม่น้อยแล้ว ..
  • Respect: +10
    • ดูรายละเอียด
Re: อาจารย์และพี่ ๆ ช่วยดู my.cnf ช่วยด่วนเลยครับ
« ตอบกลับ #3 เมื่อ: กรกฎาคม 28, 2011, 10:11:40 AM »
0
... ส่วน ค่าของ  max_allowed_packet ใน section [mysqld]

   ลองกำหนดสัก 256M ดูครับ ...  :D ...


... กำหนดแล้วอย่าลืม restart ด้วยนะครับ ...
โรงพยาบาลวังน้อย   พระนครศรีอยุธยา ( รพช.30 เตียง )
Server : ProLiant DL120G6  Xeon X3450  RDIMM 12 Gb  2x256GB SSD Raid 1
OS : CentOS 6.3  DB : Percona 5.5.21

Slave : ProLiant ML110G6  Xeon X3430  UDIMM 8 Gb  2x300GB SAS Raid 1
OS : CentOS 6.3  DB : Percona 5.5.32

HOSxP version  3.57.xx.xx    เริ่มระบบ  เมษายน 2549

ออฟไลน์ มดตานอย ครับ..

  • Hero Member
  • *****
  • กระทู้: 3,137
  • Respect: 0
    • ดูรายละเอียด
Re: อาจารย์และพี่ ๆ ช่วยดู my.cnf ช่วยด่วนเลยครับ
« ตอบกลับ #4 เมื่อ: กรกฎาคม 28, 2011, 10:23:22 AM »
0
my.cnf  ดูแล้วลายตาครับ    ต้องจัดระเบียบแบบนี้ครับ  อ้างอิงจาก percona 5.5.x   แบบเฉยๆครับ ยังไม่ได้อ้างอิงกับหน่วยความจำ

################# Star MySQL-Config #####################

[client]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
default-character-set=tis620

[mysqld]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
skip-external-locking
skip-federated
big-tables
character-set-server=tis620
key_buffer = 128M
max_allowed_packet = 256M
table_open_cache = 2048
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= 128M
thread_concurrency = 8
low_priority_updates=1
skip-name-resolve
skip-character-set-client-handshake
init_connect = 'SET NAMES tis620'
max_connections = 100

################## InnoDB  #######################
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:100M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
innodb_buffer_pool_size = 500M
innodb_additional_mem_pool_size = 24M
innodb_log_file_size = 128M
innodb_file_format = barracuda
innodb_file_per_table
innodb_log_buffer_size = 8M
innodb_log_files_in_group = 2
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 120
innodb_thread_concurrency = 8
innodb_flush_method=O_DIRECT
innodb_checksums=0   
innodb_doublewrite=0   
innodb_support_xa=0       
innodb_max_dirty_pages_pct=90   
innodb_open_files = 2048
innodb_locks_unsafe_for_binlog=1
join_buffer_size = 2M
concurrent_insert = 2
max_heap_table_size = 128M

############# Percona XtraDB ############
innodb_io_capacity = 1000     
innodb_write_io_threads = 8   
innodb_read_io_threads = 8

[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 = 1M

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

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
open-files-limit = 50000


################# End MySQL-Config #################

Nakhonphanom Hospital

MR.Tanoy999 ผู้ใช้งานทั่วไป
tanoy999-at-gmail-dot-com
เริ่ม  1 ตุลาคม 2549  โดย  BMS

ออฟไลน์ Khuad

  • Hero Member
  • *****
  • กระทู้: 3,778
  • .. นางฟ้า ตัวไม่น้อยแล้ว ..
  • Respect: +10
    • ดูรายละเอียด
Re: อาจารย์และพี่ ๆ ช่วยดู my.cnf ช่วยด่วนเลยครับ
« ตอบกลับ #5 เมื่อ: กรกฎาคม 28, 2011, 10:23:41 AM »
0
... ขอโทษทีครับ  ลืมดูที่ค่า config ที่แนบมาด้วย

    ให้เพิ่มค่าของ  max_allowed_packet ใน section [mysqldump] ที่ไฟล์ my.cnf ของ server ทั้งสองเครื่องด้วยครับ
    ใส่ค่าเป็น 1024M ...  :D ...
โรงพยาบาลวังน้อย   พระนครศรีอยุธยา ( รพช.30 เตียง )
Server : ProLiant DL120G6  Xeon X3450  RDIMM 12 Gb  2x256GB SSD Raid 1
OS : CentOS 6.3  DB : Percona 5.5.21

Slave : ProLiant ML110G6  Xeon X3430  UDIMM 8 Gb  2x300GB SAS Raid 1
OS : CentOS 6.3  DB : Percona 5.5.32

HOSxP version  3.57.xx.xx    เริ่มระบบ  เมษายน 2549

ออฟไลน์ komanp

  • Sr. Member
  • ****
  • กระทู้: 375
  • Respect: 0
    • ดูรายละเอียด
Re: อาจารย์และพี่ ๆ ช่วยดู my.cnf ช่วยด่วนเลยครับ
« ตอบกลับ #6 เมื่อ: กรกฎาคม 28, 2011, 17:00:01 PM »
0
ขอบคุณมากเลยครับ แก้ปัญหาที่บอกได้แล้ว แต่ตอนนี้เจอปัญหาใหม่
http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=21993.0#new

อีกนิดเดียวครับ รบกวนอีกทีครับ
komanp_msu2004@hotmail.com
Server ubuntu 8.10 64 Bit Mysql 5.0.67    ram 2 GB  raid 5
3.52.8.30