ผู้เขียน หัวข้อ: error innodb_file_per_table ใครก๊ได้ช่วยที  (อ่าน 5818 ครั้ง)

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

ออฟไลน์ xycop

  • Full Member
  • ***
  • กระทู้: 157
  • Respect: +1
    • ดูรายละเอียด
    • โรงพยาบาลบ้านโป่ง
error innodb_file_per_table ใครก๊ได้ช่วยที
« เมื่อ: กุมภาพันธ์ 16, 2010, 17:48:57 PM »
0
CentOS 4.7+MySQL 5.1.42-9 percona+XtraDB
-RAM(server)  8 G
-CPU(server)  Intel Xeon E7420 Processor 2.13 GHz  4Core SAS 146x2 10k(Raid5) Storage Controller SAS 300x5 15k(Raid5)
-Switch 10/100 ,24 Port 3 ตัว ,16 Port 8 ตัว
-ขนาดฐาน HOSxP 26 Gb
-จำนวนตารางที่เป็น innodb,myisam 95%
-จำนวนเครื่องที่ใช้  100 เครื่อง
-OS CentOS 4.7 x64  Text mode
-คนไข้เฉลี่ยวันละประมาณ 900-1000 คน

ได้ส่งไฟล์ my.cnf และ error มาให้ด้วยครับ
xycop@hotmail.com
ขอบคุณครับ 
ธันยา สุระคำแหง ตำแหน่งนักวิชาการคอมพิวเตอร์ โรงพยาบาลบ้านโป่ง จังหวัดราชบุรี
e-mail  xycop@hotmail.com       Mobile  08-1540-0022

ออฟไลน์ openone

  • Newbie
  • *
  • กระทู้: 4
  • Respect: 0
    • ดูรายละเอียด
Re: error innodb_file_per_table ใครก๊ได้ช่วยที
« ตอบกลับ #1 เมื่อ: กุมภาพันธ์ 16, 2010, 17:55:08 PM »
0
 ;D ;D ;D ;D ;D ;D
ว่าที่ ร.ต.สรวิศิฏ์ ลิ้มศิริ <เท่ห่><status ตั้งไข่>
เจ้าหน้าที่ IT รพ.นครชัยศรี

server: IBM X3550 CPU xeon 2.0 Ghz Ram 8 Gb. HDD 146 Gb.
(VMware ESXI 4.0 )
Hosxp : 3.54.2.2
Guest 1: Master : Centos 5.2 64 bit mysql 5.1.39-percona Ram 4 Gb HDD : 80 Gb<ฺBMSทำให้>
Guest 2 : Windowns server 2003 32 bit Ram 2.5 Gb HDD 40 Gb (Run Program  ที่ไม่เกี่ยวกับ hosxp ^ ^!)

Slave : PC Hp P.D 935 Centos 5.2 64 bit ram 4 Gb HDD 250 Gb mysql 5.1.39-percona<ลองหัดทำเอง>

ความทุกข์ที่เกินทน จะหลอมคนให้ทนทาน
ปัญญาไม่เกิด ถ้าไม่เกิดปัญหา

อาจารย์ The one ของผม อ.นาจ รพ.หลวงพ่อเปิ่น
และขอขอบคุณ ที่คอยช่วยเหลือมาตลอด

ออฟไลน์ กรรมคือการกระทำ

  • Jr. Member
  • **
  • กระทู้: 99
  • Respect: 0
    • ดูรายละเอียด
Re: error innodb_file_per_table ใครก๊ได้ช่วยที
« ตอบกลับ #2 เมื่อ: กุมภาพันธ์ 16, 2010, 18:21:37 PM »
0
ดูจาก my.cnf แลัวขาด
หลายตัว

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

[mysqld]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 300M
max_allowed_packet = 16M
table_cache = 1500
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 1M
myisam_sort_buffer_size = 128M
thread_cache = 8
query_cache_size= 128M
max_heap_table_size = 128M

thread_concurrency = 8
default-character-set=tis620
skip-name-resolve
innodb_file_per_table
skip-character-set-client-handshake
init_connect = 'SET NAMES tis620'
log_bin_trust_function_creators = 1

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_log_arch_dir = /var/lib/mysql/
innodb_buffer_pool_size = 1200M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 134217728
innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
innodb_flush_log_at_trx_commit=2
innodb_flush_method=O_DIRECT
innodb_support_xa = 0
innodb_doublewrite = 0
innodb_table_locks = 0
innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M
allow-keywords

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

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

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

[mysqlhotcopy]
interactive-timeout


แก้

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

[mysqld]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
default-storage-engine=INNODB
default_table_type = INNODB
skip-locking
key_buffer = 128M
max_allowed_packet = 512M
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 1M
myisam_sort_buffer_size = 128M
thread_cache = 8
query_cache_size= 128M
max_heap_table_size = 512M

thread_concurrency = 32
default-character-set=tis620
skip-name-resolve
innodb_file_per_table = 1
skip-character-set-client-handshake
init_connect = 'SET NAMES tis620'
log_bin_trust_function_creators = 1

innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:100M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
innodb_log_files_in_group = 3
innodb_buffer_pool_size =  5G
innodb_additional_mem_pool_size = 20M
innodb_log_file_size =  1G
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit=2
innodb_flush_method=O_DIRECT
innodb_support_xa = 0
innodb_doublewrite = 0
innodb_table_locks = 0
innodb_lock_wait_timeout = 50

innodb_io_capacity = 10000
innodb_write_io_threads = 32
innodb_read_io_threads = 32
innodb_checksums = 0
table_open_cache = 8000
low_priority_updates=1

[mysqldump]
quick
max_allowed_packet = 1024M
allow-keywords

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

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

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

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
open-files-limit = 8192

« แก้ไขครั้งสุดท้าย: กุมภาพันธ์ 16, 2010, 19:27:48 PM โดย pompam2 »
Server Master FreeBSD-9.0+MySQL-5.5.30
Server Slave   FreeBSD-8.2+MySQL-5.5.30

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

  • Hero Member
  • *****
  • กระทู้: 3,137
  • Respect: 0
    • ดูรายละเอียด
Re: error innodb_file_per_table ใครก๊ได้ช่วยที
« ตอบกลับ #3 เมื่อ: กุมภาพันธ์ 16, 2010, 19:45:08 PM »
0
centos5.4+mysql5.1.42-percona   จริงๆ centos ตัวเดิมก็ได้   

error ที่ว่า ตอนติดตั้ง  mysql ครั้งแรกยังไม่ได้ลบไฟล์   ib*


Nakhonphanom Hospital

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

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

  • Hero Member
  • *****
  • กระทู้: 3,137
  • Respect: 0
    • ดูรายละเอียด
Re: error innodb_file_per_table ใครก๊ได้ช่วยที
« ตอบกลับ #4 เมื่อ: กุมภาพันธ์ 16, 2010, 20:03:29 PM »
0
################## start   config  #####################

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

[mysqld]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 512M
max_allowed_packet = 512M
table_open_cache = 1600
sort_buffer_size = 1M
low_priority_updates=1 
read_buffer_size = 1M
read_rnd_buffer_size = 1M
myisam_sort_buffer_size = 512M
thread_cache = 8
query_cache_size= 512M
thread_concurrency = 8
default-character-set=tis620
skip-name-resolve
skip-character-set-client-handshake
init_connect = 'SET NAMES tis620'
max_connections = 150

##################InnoDB#######################
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
innodb_buffer_pool_size = 4500M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 256M
innodb_file_per_table
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
innodb_thread_concurrency = 0
innodb_flush_method=O_DIRECT
innodb_checksums=0   
innodb_doublewrite=0   
innodb_support_xa=0       
innodb_max_dirty_pages_pct=15   
innodb_open_files = 1600
innodb_locks_unsafe_for_binlog=1
join_buffer_size = 2M
concurrent_insert = 2
max_heap_table_size = 128M
log_bin_trust_function_creators = 1

############# percona ############
#innodb_adaptive_checkpoint = 1
#innodb_io_capacity = 10000       
#innodb_write_io_threads = 16   
#innodb_read_io_threads = 16   


[mysqldump]
quick
max_allowed_packet = 512M
allow-keywords

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

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

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

[mysqlhotcopy]
interactive-timeout

################# end  ##################

อันนี้ของผมครับ    ลองทดสอบครับ

ส่วน percona ที่ conment ไว้ ให้เปิดหลัง dump database  เสร็จ


Nakhonphanom Hospital

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

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

  • Hero Member
  • *****
  • กระทู้: 3,137
  • Respect: 0
    • ดูรายละเอียด
Re: error innodb_file_per_table ใครก๊ได้ช่วยที
« ตอบกลับ #5 เมื่อ: กุมภาพันธ์ 16, 2010, 20:09:14 PM »
0
#!/bin/sh
mysqldump --opt --default-character-set=tis620 --force --allow-keywords --single-transaction -h 192.168..1 -u sa -psa  hos > /var/backup/hos.sql



ข้างบนเป็น scrip backup database ครับ   ลองเอาแก้และไปใช้ครับ 

ใช้วิธี  dump   ข้อมูล ที่  command  จะเร็วกว่า การ inital import 

Nakhonphanom Hospital

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

ออฟไลน์ xycop

  • Full Member
  • ***
  • กระทู้: 157
  • Respect: +1
    • ดูรายละเอียด
    • โรงพยาบาลบ้านโป่ง
Re: error innodb_file_per_table ใครก๊ได้ช่วยที
« ตอบกลับ #6 เมื่อ: กุมภาพันธ์ 16, 2010, 20:34:18 PM »
0
ขอขอบคุณอาจารย์ทุกท่านที่ให้ความช่วยเหลือ พรุ่งนี้จะทดสอบดู ได้ผลอย่างไรจะแจ้งให้ทราบอีกที
ธันยา สุระคำแหง ตำแหน่งนักวิชาการคอมพิวเตอร์ โรงพยาบาลบ้านโป่ง จังหวัดราชบุรี
e-mail  xycop@hotmail.com       Mobile  08-1540-0022