BMS-HOSxP Community

HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: walamza14 ที่ สิงหาคม 08, 2012, 13:03:00 PM

หัวข้อ: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: walamza14 ที่ สิงหาคม 08, 2012, 13:03:00 PM
MySQL start ไม่ได้ครับ

RAM 20G
centos 6.2 64bit
Percona-Server 55-5.5.24

ใช้คำสั่ง cp my.cnf /etc/my.cnf แล้ว mysql start ไม่ได้ครับ

120808 12:48:34 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120808 12:48:34 [Note] Flashcache bypass: disabled
120808 12:48:34 [Note] Flashcache setup error is : open flash device failed

120808 12:48:34 [Note] Plugin 'FEDERATED' is disabled.
120808 12:48:34 [ERROR] innobase_buffer_pool_size can't be over 4GB on 32-bit systems
120808 12:48:34 [ERROR] Plugin 'InnoDB' init function returned error.
120808 12:48:34 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120808 12:48:34 [ERROR] /usr/sbin/mysqld: unknown variable 'myisam_max_extra_sort_file_size=2048M'
120808 12:48:34 [ERROR] Aborting

120808 12:48:34 [Note] /usr/sbin/mysqld: Shutdown complete

120808 12:48:34 mysqld_safe mysqld from pid file /var/lib/mysql/kabchoeng.kabchoeng.com.pid ended


[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
table_cache = 2048
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 1M
join_buffer_size = 2M
bulk_insert_buffer_size = 40M
max_heap_table_size = 1024M
myisam_sort_buffer_size = 512M
myisam_max_sort_file_size = 2048M
myisam_max_extra_sort_file_size = 2048M
myisam_repair_threads = 1
myisam_recover
thread_cache_size = 1600
query_cache_size= 512M
thread_cache_size = 8
thread_concurrency = 8
default-character-set=tis620
max_connections = 300
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
skip-federated
innodb_file_per_table
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:100M:autoextend
innodb_max_dirty_pages_pct = 90
innodb_doublewrite = 0
innodb_buffer_pool_size = 14336M
innodb_additional_mem_pool_size = 32M
innodb_log_files_in_group = 3
innodb_log_group_home_dir = /var/lib/mysql/
innodb_log_file_size = 2048M
innodb_log_buffer_size = 20M
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 = 10
innodb_support_xa = 0
innodb_locks_unsafe_for_binlog = 1
innodb_adaptive_checkpoint = 1
innodb_io_capacity = 10000
innodb_write_io_threads = 16
innodb_read_io_threads = 16
innodb_checksums = 0
innodb_max_dirty_pages_pct=15
table_open_cache = 10000
low_priority_updates=1
innodb_file_format=barracuda
innodb_strict_mode=1

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

[mysqldump]
quick
max_allowed_packet = 2024M
allow-keywords

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

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

[myisamchk]
key_buffer = 2000M
sort_buffer_size = 1024M
read_buffer = 16M
write_buffer = 16M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
open-files-limit = 8192


หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: udomchok ที่ สิงหาคม 08, 2012, 13:21:44 PM
กลับมาใช้ my.cnf ตัวเก่าก่อนครับ
ดู hostname.err ใน /var/lib/mysql ด้วยครับ ว่ารายงานว่าอย่างไร
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: walamza14 ที่ สิงหาคม 08, 2012, 13:31:35 PM
กลับมาใช้ my.cnf ตัวเก่าก่อนครับ
ดู hostname.err ใน /var/lib/mysql ด้วยครับ ว่ารายงานว่าอย่างไร

เป็น server ใหม่ครับ พึ่งเริ่มติดตั้งยังไม่ได้เริ่มใช้งานครับ
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: มนตรี บอยรักยุ้ยคนเดียว ที่ สิงหาคม 08, 2012, 13:34:27 PM
 ;D ;D ;D ;D

120808 12:48:34 [ERROR] innobase_buffer_pool_size can't be over 4GB on 32-bit systems

Basic Linux Commands สำหรับตรวจสอบและแก้ไขปัญหา
http://ncs.msu.ac.th/archives/893.html

1. คำสั่งสำหรับตรวจสอบ Linux เวอร์ชั่น

#cat /proc/version
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: Khuad ที่ สิงหาคม 08, 2012, 13:39:10 PM
... ตามที่ อ.พี่โก้บอกครับ

    ให้ดูที่   ชื่อserver.err ใน /var/lib/mysql  ว่ามีอะไรบ้าง เพราะอาจจะต้องแก้ไขค่าของ innodb_log_file_size  .....



... แต่ถ้าเพิ่งติดตั้งใหม่ ยังไม่มีข้อมูลในฐานข้อมูลเลย
    ก็สั่ง   #rm /var/lib/mysql/ib*  แล้วค่อยสั่ง start MySQL ครับ
    แต่ถ้ามีฐานข้อมูล มีข้อมูลแล้ว อย่าสั่งลบ ib* นะครับ เดี๋ยวงานเข้า ...  :D ...
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: Man Of Romance ที่ สิงหาคม 08, 2012, 13:43:03 PM
default-storage-engine=INNODB
เคย start ไม่ขึ้น แบบ นี้แหละครับ เลยตัด บรรทัดนี้ออก จนป่านนี้ก็ยังไม่กล้าใช้ Server ตัวนี้เป็นตัวจริงเลย แต่มัน start my sql ได้  แต่ไม่ทราบผลว่าดี หรือไม่ อย่างไร
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: Khuad ที่ สิงหาคม 08, 2012, 13:45:02 PM
... แล้วก็ ที่ my.cnf

    ให้ไป # ที่ myisam_max_extra_sort_file_size = 2048M ด้วยครับ
    MySQL ไม่รู้จักค่านี้ครับ ...  :D ...
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: dotAtainer ที่ สิงหาคม 08, 2012, 13:47:30 PM
ตรง skip-locking น่าจะตัดออกหรือใส่ # ไว้ข้างหน้าฮะแล้วใส่ skip-external-locking แทน
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: Khuad ที่ สิงหาคม 08, 2012, 13:53:40 PM
default-storage-engine=INNODB
เคย start ไม่ขึ้น แบบ นี้แหละครับ เลยตัด บรรทัดนี้ออก จนป่านนี้ก็ยังไม่กล้าใช้ Server ตัวนี้เป็นตัวจริงเลย แต่มัน start my sql ได้  แต่ไม่ทราบผลว่าดี หรือไม่ อย่างไร

... รู้สึกว่า Percona 5.5.24 นี่ default ของมันเป็น InnoDB อยู่แล้วครับ
    ใน config ไม่ต้องมี variable นี้ครับ ...  :D ...

หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: มดตานอย ครับ.. ที่ สิงหาคม 08, 2012, 14:03:13 PM
-innobase_buffer_pool_size can't be over 4GB on 32-bit systems

-unknown variable 'myisam_max_extra_sort_file_size=2048M'




หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: เข้ม ที่ สิงหาคม 08, 2012, 14:14:39 PM
-innobase_buffer_pool_size can't be over 4GB on 32-bit systems

-unknown variable 'myisam_max_extra_sort_file_size=2048M'


ลงแบบ 64 bit ครับ ไม่รู้ hardware รองรับหรือป่าว
และ myisam_max_extra_sort_file_size=2048M สำหรับ 5.5.x
 น่าจะเป็น myisam_max_sort_file_size = 2048M
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: walamza14 ที่ สิงหาคม 08, 2012, 14:36:20 PM
-innobase_buffer_pool_size can't be over 4GB on 32-bit systems

-unknown variable 'myisam_max_extra_sort_file_size=2048M'


ลงแบบ 64 bit ครับ ไม่รู้ hardware รองรับหรือป่าว
และ myisam_max_extra_sort_file_size=2048M สำหรับ 5.5.x
 น่าจะเป็น myisam_max_sort_file_size = 2048M

ตั้งใจจะลง 64 bit นะครับ สงใสจะโหลดมาผิด
พอจะมี link download  centos 6.2 x86_64 หรือเปล่าครับ
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: walamza14 ที่ สิงหาคม 09, 2012, 11:17:17 AM
ติดตั้ง centos และ percona-server ใหม่ทั้งหมดแล้ว ก็ยังไม่สามารถ start mysql ได้ครับ

120809 11:15:00 mysqld_safe mysqld from pid file /var/lib/mysql/kabchoeng.kabchoeng.com.pid ended
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: dotAtainer ที่ สิงหาคม 09, 2012, 13:39:11 PM
สั่ง cat /var/lib/mysql/kabchoeng.kabchoeng.com.err แล้วโพสมาให้ดูหน่อยครับ
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: walamza14 ที่ สิงหาคม 09, 2012, 15:47:42 PM
120809 11:38:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120809 11:38:57 [Note] Flashcache bypass: disabled
120809 11:38:57 [Note] Flashcache setup error is : ioctl failed

120809 11:38:57 [Note] Plugin 'FEDERATED' is disabled.
120809 11:38:57 InnoDB: The InnoDB memory heap is disabled
120809 11:38:57 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120809 11:38:57 InnoDB: Compressed tables use zlib 1.2.3
120809 11:38:57 InnoDB: Using Linux native AIO
120809 11:38:57 InnoDB: Initializing buffer pool, size = 14.0G
120809 11:38:58 InnoDB: Completed initialization of buffer pool
InnoDB: Error: auto-extending data file /var/lib/mysql/ibdata1 is of a different size
InnoDB: 1152 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 6400 pages, max 0 (relevant if non-zero) pages!
120809 11:38:58 InnoDB: Could not open or create data files.
120809 11:38:58 InnoDB: If you tried to add new data files, and it failed here,
120809 11:38:58 InnoDB: you should now edit innodb_data_file_path in my.cnf back
120809 11:38:58 InnoDB: to what it was, and remove the new ibdata files InnoDB created
120809 11:38:58 InnoDB: in this failed attempt. InnoDB only wrote those files full of
120809 11:38:58 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
120809 11:38:58 InnoDB: remove old data files which contain your precious data!
120809 11:38:58 [ERROR] Plugin 'InnoDB' init function returned error.
120809 11:38:58 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120809 11:38:58 [ERROR] /usr/sbin/mysqld: unknown variable 'default_table_type=INNODB'
120809 11:38:58 [ERROR] Aborting

120809 11:38:58 [Note] /usr/sbin/mysqld: Shutdown complete

120809 11:38:58 mysqld_safe mysqld from pid file /var/lib/mysql/kabchoeng.kabchoeng.com.pid ended
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: udomchok ที่ สิงหาคม 10, 2012, 01:32:17 AM
120809 11:38:58 [ERROR] Plugin 'InnoDB' init function returned error.
120809 11:38:58 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120809 11:38:58 [ERROR] /usr/sbin/mysqld: unknown variable 'default_table_type=INNODB'
120809 11:38:58 [ERROR] Aborting
ลอง comment บรรทัดที่ฟ้อง error (สีแดง) แบบนี้ครับ
#default_table_type=INNODB
ใน my.cnf นะครับ
หัวข้อ: Re: MySQL start ไม่ได้ครับ
เริ่มหัวข้อโดย: มนตรี บอยรักยุ้ยคนเดียว ที่ สิงหาคม 10, 2012, 08:26:16 AM
120809 11:38:58 [ERROR] Plugin 'InnoDB' init function returned error.
120809 11:38:58 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120809 11:38:58 [ERROR] /usr/sbin/mysqld: unknown variable 'default_table_type=INNODB'
120809 11:38:58 [ERROR] Aborting
ลอง comment บรรทัดที่ฟ้อง error (สีแดง) แบบนี้ครับ
#default_table_type=INNODB
ใน my.cnf นะครับ

หรือ default-table-type=INNODB
อ้างอิงจาก : http://dev.mysql.com/doc/refman/5.5/en/storage-engine-setting.html
http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_default-storage-engine

InnoDB: Error: auto-extending data file /var/lib/mysql/ibdata1 is of a different size