ผู้เขียน หัวข้อ: ใช้ my.cnf สำหรับ 2G มาใช้กับ 4G ได้หรือป่าวครับ  (อ่าน 5961 ครั้ง)

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

ออฟไลน์ ธราพงษ์

  • Jr. Member
  • **
  • กระทู้: 83
  • Respect: +11
    • ดูรายละเอียด
    • Tharaphong Chamnan
ใช้ my.cnf สำหรับ 2G มาใช้กับ 4G ได้หรือป่าวครับ
« เมื่อ: พฤศจิกายน 27, 2012, 03:23:08 AM »
0
คือว่าผม ผมมีเครื่อง pc ประกอบใหม่ตามนี้ครับ

M/B : Intel
CPU : Xeon 2.4GHz core 2
RAM : 4GB
HDD : SATA-II 500GB 7200 RPM

ผมลง CentOS 6.3 และเลือก package
- NFS , Samba , FTP , SendMail , PHP

ไม่เลือก MySQL จะลง Percona MySQL 5.5.28

ติดตั้ง Webmin 1.600 แล้วลง package ของ Percona MySQL 5.5.28

copy my.cnf จากตัวที่ทำไว้ก่อนหน้า แต่แรม 2GB มาใช้

อ้างถึง
[client]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
default-character-set=tis620

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

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
#skip-locking
skip-external-locking
log_bin_trust_function_creators = 1


key_buffer = 128M
max_allowed_packet = 512M
#table_cache = 1500
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 1M
join_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_type=1
query_cache_size = 256M
thread_concurrency = 8
#default-character-set=tis620
character-set-server=tis620
init_connect = 'SET NAMES tis620'
skip-name-resolve
innodb_file_per_table
skip-character-set-client-handshake
init_connect = 'SET NAMES tis620'
max_heap_table_size = 512M


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 = 1024M
innodb_additional_mem_pool_size = 20M
innodb_thread_concurrency = 0
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 50
innodb_flush_method=O_DIRECT
innodb_doublewrite=0
innodb_support_xa = 0
innodb_open_files = 2000


innodb_io_capacity = 400
transaction_isolation = REPEATABLE-READ
#innodb_adaptive_checkpoint = 1
innodb_write_io_threads = 16
innodb_read_io_threads = 16

innodb_data_file_path = ibdata1:200M:autoextend
innodb_log_buffer_size = 16M
innodb_log_file_size = 256M

innodb_locks_unsafe_for_binlog=1
concurrent_insert = 2
max_connections = 100


[mysqldump]
quick
max_allowed_packet =512M
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

[mysql_safe]
open-files-limit = 50000

เมื่อสั่ง start MySQL แต่เกิด FAILED และใน host.err แสดงตามนี้ครับ
อ้างถึง
121127 02:58:28 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
121127  2:58:28 [Note] Plugin 'FEDERATED' is disabled.
121127  2:58:28 InnoDB: The InnoDB memory heap is disabled
121127  2:58:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121127  2:58:28 InnoDB: Compressed tables use zlib 1.2.3
121127  2:58:28 InnoDB: Using Linux native AIO
121127  2:58:28 InnoDB: Initializing buffer pool, size = 1.0G
121127  2:58:28 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file /var/lib/mysql/ibdata1 did not exist:
InnoDB: a new database to be created!
121127  2:58:28  InnoDB: Setting file /var/lib/mysql/ibdata1 size to 200 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200
121127  2:58:30  InnoDB: Log file /var/lib/mysql/ib_logfile0 did not exist: new to be created
InnoDB: Setting log file /var/lib/mysql/ib_logfile0 size to 256 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200
121127  2:58:32  InnoDB: Log file /var/lib/mysql/ib_logfile1 did not exist: new to be created
InnoDB: Setting log file /var/lib/mysql/ib_logfile1 size to 256 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
121127  2:58:35  InnoDB: Waiting for the background threads to start
121127  2:58:36 Percona XtraDB (http://www.percona.com) 1.1.8-rel29.1 started; log sequence number 0
121127  2:58:36 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
121127  2:58:36 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
121127  2:58:36 [Note] Server socket created on IP: '0.0.0.0'.
121127  2:58:36 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
121127  2:58:36 [ERROR] Do you already have another mysqld server running on port: 3306 ?
121127  2:58:36 [ERROR] Aborting

121127  2:58:36  InnoDB: Starting shutdown...
121127  2:58:41  InnoDB: Shutdown completed; log sequence number 1597914
121127  2:58:41 [Note] /usr/sbin/mysqld: Shutdown complete

121127 02:58:41 mysqld_safe mysqld from pid file /var/lib/mysql/phraodatacenter.com.pid ended
นายธราพงษ์  ชำนาญ (เอ๋) นักวิชาการคอมพิวเตอร์
รพ.พร้าว (11127) จังหวัดเชียงใหม่

M : Dell PowerEdge R210 II RAM 32GB HDD 1TB
S : Lenovo x3240 M5 RAM 4GB HDD 1TB

Activation 56 : 01-02-56
Activation 57 : 31-03-57
Activation 58 : 26-06-58
Activation 59 : ได้รับสิทธิฟรี
Activation 60 : 01-01-60

ออฟไลน์ chk

  • Hero Member
  • *****
  • กระทู้: 1,949
  • Respect: +2
    • ดูรายละเอียด
Re: ใช้ my.cnf สำหรับ 2G มาใช้กับ 4G ได้หรือป่าวครับ
« ตอบกลับ #1 เมื่อ: พฤศจิกายน 27, 2012, 09:09:05 AM »
0
 8)  แบบว่าค่า my ใช้ไม่ได้นะขอรับ ตั้งปรับอีกนิดหน่อย   8)

 8)  หาได้จากการปรับค่า my.cnf  นะขอรับ  8)

 8)  หรือจะลองใช้ของบริษัท  จาก  BMSXtrabackupGUI 4.6   ได้เช่นกันขอรับ  8)

 :o  โดยตัวหลังจะปรับค่าให้อัตโมมัติ  พร้อมลง Mysql 5.5 ให้ด้วยขอรับ  8)
8) ........ {O.*} ............   8)
8) ...KUMPANGSEAN  HOSXP  SYSTEM...   8) Office  Station ::  Kumpangsan Hospital  Nakhon Pathom
 System  Running :: 01/01/2010

ออฟไลน์ ธราพงษ์

  • Jr. Member
  • **
  • กระทู้: 83
  • Respect: +11
    • ดูรายละเอียด
    • Tharaphong Chamnan
Re: ใช้ my.cnf สำหรับ 2G มาใช้กับ 4G ได้หรือป่าวครับ
« ตอบกลับ #2 เมื่อ: พฤศจิกายน 27, 2012, 11:12:23 AM »
0
เปลี่ยน my.cnf ใหม่ครับ ได้แล้ว  ;D ;D ;D

อ้างถึง
[client]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
default-character-set=tis620

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

[mysqld]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
#skip-locking
# You can adjust key_buffer to 10% off Physical memory (for innodb base engine)
# or adjust key_buffer to 60% off Physical memory (for myisam base engine)
key_buffer = 128M
max_allowed_packet = 512M
table_cache = 1500
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 1M
join_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_type=1
query_cache_size= 256M
thread_concurrency = 8
#default-character-set=tis620
skip-name-resolve
innodb_file_per_table
skip-character-set-client-handshake
init_connect = 'SET NAMES tis620'
max_heap_table_size = 512M


innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
# You can adjust innodb_buffer_pool_size to 70% off Physical memory (for innodb base engine)
# or adjust innodb_buffer_pool_size to 10% off Physical memory (for myisam base engine)
innodb_buffer_pool_size = 1024M
innodb_additional_mem_pool_size = 20M
innodb_thread_concurrency = 0
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 50
innodb_flush_method=O_DIRECT
innodb_doublewrite=0
innodb_support_xa = 0
innodb_open_files = 2000

#***percona Extra-DB Only***
innodb_io_capacity = 10000
#innodb_adaptive_checkpoint = 1
innodb_write_io_threads = 16
innodb_read_io_threads = 16
#***percona Extra-DB Only***

innodb_locks_unsafe_for_binlog=1
concurrent_insert = 2
max_connections=100


[mysqldump]
quick
max_allowed_packet =512M
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

[mysql_safe]
open-files-limit = 50000
นายธราพงษ์  ชำนาญ (เอ๋) นักวิชาการคอมพิวเตอร์
รพ.พร้าว (11127) จังหวัดเชียงใหม่

M : Dell PowerEdge R210 II RAM 32GB HDD 1TB
S : Lenovo x3240 M5 RAM 4GB HDD 1TB

Activation 56 : 01-02-56
Activation 57 : 31-03-57
Activation 58 : 26-06-58
Activation 59 : ได้รับสิทธิฟรี
Activation 60 : 01-01-60