BMS-HOSxP Community

HOSxP => MySQL => ข้อความที่เริ่มโดย: dreaming ที่ พฤศจิกายน 12, 2013, 19:41:08 PM

หัวข้อ: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: dreaming ที่ พฤศจิกายน 12, 2013, 19:41:08 PM
ขึ้นให้สร้าง function ต้องทำยังงัยต่อครับ
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: Sukjai ที่ พฤศจิกายน 12, 2013, 20:14:40 PM
ไม่ต้องทำอะไรก็ได้ครับ หรือ จะสร้างตามก็ได้
โดยการ พิมพ์ที่ละบรรทัด ตรง #
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: dreaming ที่ พฤศจิกายน 12, 2013, 20:20:36 PM
start mysql ไม่ขึ้นอะครับ

131112 20:43:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
131112 20:43:38 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
131112 20:43:38 [Warning] option 'max_allowed_packet': unsigned value 3221225472 adjusted to 1073741824
131112 20:43:38 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
131112 20:43:38 [Warning] option 'max_allowed_packet': unsigned value 3221225472 adjusted to 1073741824
131112 20:43:38 [Note] Plugin 'FEDERATED' is disabled.
131112 20:43:38 InnoDB: The InnoDB memory heap is disabled
131112 20:43:38 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131112 20:43:38 InnoDB: Compressed tables use zlib 1.2.3
131112 20:43:38 InnoDB: Using Linux native AIO
131112 20:43:38 InnoDB: Initializing buffer pool, size = 384.0M
131112 20:43:38 InnoDB: Completed initialization of buffer pool
InnoDB: Error: data file /var/lib/mysql/ibdata1 is of a different size
InnoDB: 640 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 128000 pages!
131112 20:43:38 InnoDB: Could not open or create data files.
131112 20:43:38 InnoDB: If you tried to add new data files, and it failed here,
131112 20:43:38 InnoDB: you should now edit innodb_data_file_path in my.cnf back
131112 20:43:38 InnoDB: to what it was, and remove the new ibdata files InnoDB created
131112 20:43:38 InnoDB: in this failed attempt. InnoDB only wrote those files full of
131112 20:43:38 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
131112 20:43:38 InnoDB: remove old data files which contain your precious data!
131112 20:43:38 [ERROR] Plugin 'InnoDB' init function returned error.
131112 20:43:38 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
131112 20:43:38 [ERROR] /usr/sbin/mysqld: unknown option '--skip-locking'
131112 20:43:38 [ERROR] Aborting

131112 20:43:38 [Note] /usr/sbin/mysqld: Shutdown complete

131112 20:43:38 mysqld_safe mysqld from pid file /var/lib/mysql/slavehosxp.pid ended
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: Sukjai ที่ พฤศจิกายน 12, 2013, 20:26:48 PM
Error จากตรงนี้ครับ

131112 20:43:38 [ERROR] Plugin 'InnoDB' init function returned error.
131112 20:43:38 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

เครื่องนี้เป็น Slave หรือ Master ครับ
Database เดิม เป็นแบบไหนครับ เป็น InnoDB กี่ % หรือ MyISAM  ครับ
โพส my.cnf ขึ้นมาดูด้วยก็ได้ครับ

------------------------------------------------->

ลองทำตามนี้ดูครับ http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=27068.msg226691#msg226691
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: dreaming ที่ พฤศจิกายน 12, 2013, 21:01:54 PM
my.cnf


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

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
#skip-locking
key_buffer = 384M
max_allowed_packet = 3072M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
default-character-set=tis620
innodb_file_per_table



log-bin=mysql-bin


# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 384M
innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 100M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

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

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

[mysqlhotcopy]
interactive-timeout
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: Sukjai ที่ พฤศจิกายน 12, 2013, 21:08:03 PM
ถ้าเป็นเครื่องสำรอง หรือ Slave แนะนำให้ลงใหม่เลยจะดีกว่าครับ จะทำให้รองรับระบบในอนาคตได้ดีกว่าครับ

http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=31786.msg251871#msg251871
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: dreaming ที่ พฤศจิกายน 12, 2013, 21:29:11 PM
พอดีจะอัพตัว master ด้วยอะครับ
slave กับ master ใช้ percona เหมือนกัน

ขอ my.cnf  percona 5.5 
ram 5 gb
ram 1 gb
ขอบคุณล่วงหน้าครับ
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: udomchok ที่ พฤศจิกายน 13, 2013, 00:27:22 AM
start mysql ไม่ขึ้นอะครับ

131112 20:43:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
131112 20:43:38 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
131112 20:43:38 [Warning] option 'max_allowed_packet': unsigned value 3221225472 adjusted to 1073741824
131112 20:43:38 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
131112 20:43:38 [Warning] option 'max_allowed_packet': unsigned value 3221225472 adjusted to 1073741824
131112 20:43:38 [Note] Plugin 'FEDERATED' is disabled.
131112 20:43:38 InnoDB: The InnoDB memory heap is disabled
131112 20:43:38 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131112 20:43:38 InnoDB: Compressed tables use zlib 1.2.3
131112 20:43:38 InnoDB: Using Linux native AIO
131112 20:43:38 InnoDB: Initializing buffer pool, size = 384.0M
131112 20:43:38 InnoDB: Completed initialization of buffer pool
InnoDB: Error: data file /var/lib/mysql/ibdata1 is of a different size
InnoDB: 640 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 128000 pages!
131112 20:43:38 InnoDB: Could not open or create data files.
131112 20:43:38 InnoDB: If you tried to add new data files, and it failed here,
131112 20:43:38 InnoDB: you should now edit innodb_data_file_path in my.cnf back
131112 20:43:38 InnoDB: to what it was, and remove the new ibdata files InnoDB created
131112 20:43:38 InnoDB: in this failed attempt. InnoDB only wrote those files full of
131112 20:43:38 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
131112 20:43:38 InnoDB: remove old data files which contain your precious data!
131112 20:43:38 [ERROR] Plugin 'InnoDB' init function returned error.
131112 20:43:38 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
131112 20:43:38 [ERROR] /usr/sbin/mysqld: unknown option '--skip-locking'
131112 20:43:38 [ERROR] Aborting

131112 20:43:38 [Note] /usr/sbin/mysqld: Shutdown complete

131112 20:43:38 mysqld_safe mysqld from pid file /var/lib/mysql/slavehosxp.pid ended

my.cnf


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

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port      = 3306
socket      = /var/lib/mysql/mysql.sock
#skip-locking
skip-external-locking
key_buffer = 384M
max_allowed_packet = 3072M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
default-character-set=tis620
innodb_file_per_table



log-bin=mysql-bin


# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 384M
innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 100M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

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

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

[mysqlhotcopy]
interactive-timeout

หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: chk ที่ พฤศจิกายน 13, 2013, 06:42:14 AM
 8) ช่วงเปลี่ยนถ่าย backup  ให้ดี ๆ  นะขอรับ   8)

 8)  สำหรับการปรับ ค่า My   8)

      มีสองแบบ  แบบแรกคือเปลี่ยนเฉพาะ Mysql  ไม่ติดตั้ง Linux ใหม่  โหลดตัว SQL  ที่ต้องการมาอัพ
                       แบบที่สอง  เปลี่ยนหมดทั้ง Linux  and  SQL  การปรับ my  ใช้ตัวโปรแกรมของ บริษัท
                                       
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: dreaming ที่ พฤศจิกายน 13, 2013, 08:41:10 AM
ยังไม่ได้เลยครับ ไม่ทราบว่าต้องทำไง
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: nun_bms ที่ พฤศจิกายน 13, 2013, 08:58:55 AM
ขอ Error ล่าสุดหน่อยครับ
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: nun_bms ที่ พฤศจิกายน 13, 2013, 09:08:24 AM
ไม่แน่ใจว่าก่อนหรือหลังการติดตั้ง ได้แก้ไขอะไรอีกหรือเปล่า จากที่ผมเคยลองคือถ้าไม่ได้จริง ๆ ผม จะ rename ไฟล์ ib_logfile0 กับ ib_logfile1 (อย่าลบนะครับ) แล้ว Restart เครื่องครับ
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: dreaming ที่ พฤศจิกายน 13, 2013, 09:20:42 AM
131113  9:46:14 [Warning] Using unique option prefix character-set-client instead of character-set-client-handshake is deprecated and will be removed in a future release. Please use the full name instead.
131113  9:46:14 [Warning] /usr/sbin/mysqld: ignoring option '--character-set-client-handshake' due to invalid value 'tis620'
131113  9:46:14 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
131113  9:46:14 [Warning] option 'max_allowed_packet': unsigned value 3221225472 adjusted to 1073741824
131113  9:46:14 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
131113  9:46:14 [Warning] option 'max_allowed_packet': unsigned value 3221225472 adjusted to 1073741824
131113  9:46:14 [Note] Plugin 'FEDERATED' is disabled.
131113  9:46:14 InnoDB: The InnoDB memory heap is disabled
131113  9:46:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131113  9:46:14 InnoDB: Compressed tables use zlib 1.2.3
131113  9:46:14 InnoDB: Using Linux native AIO
131113  9:46:14 InnoDB: Initializing buffer pool, size = 384.0M
131113  9:46:14 InnoDB: Completed initialization of buffer pool
InnoDB: Error: data file /var/lib/mysql/ibdata1 is of a different size
InnoDB: 1152 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 128000 pages!
131113  9:46:14 InnoDB: Could not open or create data files.
131113  9:46:14 InnoDB: If you tried to add new data files, and it failed here,
131113  9:46:14 InnoDB: you should now edit innodb_data_file_path in my.cnf back
131113  9:46:14 InnoDB: to what it was, and remove the new ibdata files InnoDB created
131113  9:46:14 InnoDB: in this failed attempt. InnoDB only wrote those files full of
131113  9:46:14 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
131113  9:46:14 InnoDB: remove old data files which contain your precious data!
131113  9:46:14 [ERROR] Plugin 'InnoDB' init function returned error.
131113  9:46:14 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
131113  9:46:14 [ERROR] /usr/sbin/mysqld: unknown option '--skip-locking'
131113  9:46:14 [ERROR] Aborting

131113  9:46:14 [Note] /usr/sbin/mysqld: Shutdown complete

131113 09:46:14 mysqld_safe mysqld from pid file /var/lib/mysql/slavehosxp.pid ended
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: nun_bms ที่ พฤศจิกายน 13, 2013, 09:36:41 AM
ยังไม่ได้แก้ไข my.cnf ตามที่พี่โก้แนะนำหรือเปล่าครับ ทำไมมันยัง Error เดิมละครับ
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: dreaming ที่ พฤศจิกายน 13, 2013, 10:53:58 AM
แก้แล้ว แต่ก็เหมือนเดิม
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: Sukjai ที่ พฤศจิกายน 13, 2013, 11:01:33 AM
แก้แล้ว แต่ก็เหมือนเดิม

--------------------------------------

เปิด Remote Team viewer ให้ น้อง nun_bms ครับ   ;D ;D ;D

หรือจะเข้าไปในกลุ่ม HoSXP on facebook ==> https://www.facebook.com/groups/hosxp/

มีพี่ๆ เพื่อนๆ ที่ให้ความช่วยเหลือได้ครับ
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: nun_bms ที่ พฤศจิกายน 13, 2013, 11:16:25 AM
ลองเอา my.cnf ตัวนี้ไปลองครับถ้าอยากลงเองลองฝีมือ แต่ถ้าเน้นสะดวกไม่เสียเวลาก็โหลดโปรแกรม BMSxTraBackupGUI ของอาจารย์ชัยพรไปติดตั้งครับ ถ้าเป็นข้อมูลสำคัญ Backup ก่อน แล้วผมจะ Remote ไปดูให้ครับ
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: dreaming ที่ พฤศจิกายน 13, 2013, 15:03:37 PM
ไม่ได้เมหือนเดิมครับ รบกวน remote ด้วย pm ไปแล้ว
หัวข้อ: Re: up percona 5.1 to 5.5
เริ่มหัวข้อโดย: มนตรี บอยรักยุ้ยคนเดียว ที่ พฤศจิกายน 13, 2013, 20:58:48 PM
ไม่ได้เมหือนเดิมครับ รบกวน remote ด้วย pm ไปแล้ว


ได้ยัง แก้ My.cnf ตาม อ.โก้ ยังแก้ไม่หมด เพราะสิ่งที่เตือนขึ้นมา คือบอกว่าไม่ใช้
เพิ่ม
#skip-character-set-client-handshake
#default-character-set=tis620