BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: BMS MA Team ที่ กรกฎาคม 14, 2008, 12:14:20 PM
-
-@- HOSxP on FreeBSD -@-
เกิดปัญหาว่า คำนำหน้าชื่อ ชื่อ และนามสกุลผู้ป่วยเป็นเครื่องหมาย ? (ดังภาพ) เป็นเฉพาะบางคนเท่านั้น
พอเข้าไปแก้ที่หน้าจอลงทะเบียนผู้ป่วยใหม่ เครื่องหมาย ? ก็หายไป กลับเป็นชื่อผู้ป่วยปกติเหมือนเดิม
-
my.cnf
ไม่ได้กำหนด tis620 ต้องทำก่อน โอนข้อมูลเข้าไป
???
-
:( ทำแล้วครับ ทำก่อน initial import ครับ มันเป็นกับบางคนนะครับ มันไม่ได้เป็น ?? ?? ?? ทุกคน
แต่พอเข้าไปแก้ที่หน้า ลงทะเบียนผู้ป่วยใหม่ มันก็หายครับ อ.อ๊อด ... ได้โปรด
-
??? :'(
-
มันเป็นที่ MySQL นี่ครับ ไม่ใช่ HOSxP
ลองส่ง my.cnf และ ผลลัพท์จากคำสั่ง show variables เข้ามาด้วยครับ
-
ส่งสัย ลง mysql
จาก port
-
show variables;
+-------------------------------------+-----------------------------------+
| Variable_name | Value |
+-------------------------------------+-----------------------------------+
| auto_increment_increment | 1 |
| auto_increment_offset | 1 |
| autocommit | ON |
| automatic_sp_privileges | ON |
| back_log | 50 |
| basedir | /usr/local/ |
| big_tables | OFF |
| binlog_cache_size | 32768 |
| binlog_format | MIXED |
| bulk_insert_buffer_size | 8388608 |
| character_set_client | tis620 |
| character_set_connection | tis620 |
| character_set_database | tis620 |
| character_set_filesystem | binary |
| character_set_results | tis620 |
| character_set_server | tis620 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/share/mysql/charsets/ |
| collation_connection | tis620_thai_ci |
| collation_database | tis620_thai_ci |
| collation_server | tis620_thai_ci |
| completion_type | 0 |
| concurrent_insert | 1 |
| connect_timeout | 5 |
| datadir | /var/db/mysql/ |
| date_format | %Y-%m-%d |
| datetime_format | %Y-%m-%d %H:%i:%s |
| default_week_format | 0 |
| delay_key_write | ON |
| delayed_insert_limit | 100 |
| delayed_insert_timeout | 300 |
| delayed_queue_size | 1000 |
| div_precision_increment | 4 |
| engine_condition_pushdown | ON |
| error_count | 0 |
| event_scheduler | OFF |
| expire_logs_days | 0 |
| flush | OFF |
| flush_time | 0 |
| foreign_key_checks | ON |
| ft_boolean_syntax | + -><()~*:""&| |
| ft_max_word_len | 84 |
| ft_min_word_len | 4 |
| ft_query_expansion_limit | 20 |
| ft_stopword_file | (built-in) |
| general_log | OFF |
| general_log_file | /var/db/mysql/hostname.log |
| group_concat_max_len | 1024 |
| have_compress | YES |
| have_crypt | YES |
| have_csv | YES |
| have_dynamic_loading | YES |
| have_geometry | YES |
| have_innodb | NO |
| have_ndbcluster | NO |
| have_openssl | DISABLED |
| have_partitioning | YES |
| have_query_cache | YES |
| have_rtree_keys | YES |
| have_ssl | DISABLED |
| have_symlink | YES |
| hostname | bsd.pch.go.th |
| identity | 0 |
| init_connect | |
| init_file | |
| init_slave | |
| insert_id | 0 |
| interactive_timeout | 28800 |
| join_buffer_size | 131072 |
| keep_files_on_create | OFF |
| key_buffer_size | 8388600 |
| key_cache_age_threshold | 300 |
| key_cache_block_size | 1024 |
| key_cache_division_limit | 100 |
| language | /usr/local/share/mysql/english/ |
| large_files_support | ON |
| large_page_size | 0 |
| large_pages | OFF |
| last_insert_id | 0 |
| lc_time_names | en_US |
| license | GPL |
| local_infile | ON |
| locked_in_memory | OFF |
| log | OFF |
| log_bin | OFF |
| log_bin_trust_function_creators | OFF |
| log_bin_trust_routine_creators | OFF |
| log_error | /var/db/mysql/hostname.err |
| log_output | TABLE |
| log_queries_not_using_indexes | OFF |
| log_slave_updates | OFF |
| log_slow_queries | OFF |
| log_warnings | 1 |
| long_query_time | 10.000000 |
| low_priority_updates | OFF |
| lower_case_file_system | OFF |
| lower_case_table_names | 0 |
| max_allowed_packet | 1048576 |
| max_binlog_cache_size | 18446744073709551615 |
| max_binlog_size | 1073741824 |
| max_connect_errors | 10 |
| max_connections | 151 |
| max_delayed_threads | 20 |
| max_error_count | 64 |
| max_heap_table_size | 16777216 |
| max_insert_delayed_threads | 20 |
| max_join_size | 18446744073709551615 |
| max_length_for_sort_data | 1024 |
| max_prepared_stmt_count | 16382 |
| max_relay_log_size | 0 |
| max_seeks_for_key | 18446744073709551615 |
| max_sort_length | 1024 |
| max_sp_recursion_depth | 0 |
| max_tmp_tables | 32 |
| max_user_connections | 0 |
| max_write_lock_count | 18446744073709551615 |
| min_examined_row_limit | 0 |
| multi_range_count | 256 |
| myisam_data_pointer_size | 6 |
| myisam_max_sort_file_size | 9223372036854775807 |
| myisam_recover_options | OFF |
| myisam_repair_threads | 1 |
| myisam_sort_buffer_size | 8388608 |
| myisam_stats_method | nulls_unequal |
| myisam_use_mmap | OFF |
| ndb_autoincrement_prefetch_sz | 32 |
| ndb_cache_check_time | 0 |
| ndb_connectstring | |
| ndb_extra_logging | 0 |
| ndb_force_send | ON |
| ndb_index_stat_cache_entries | 32 |
| ndb_index_stat_enable | OFF |
| ndb_index_stat_update_freq | 20 |
| ndb_report_thresh_binlog_epoch_slip | 3 |
| ndb_report_thresh_binlog_mem_usage | 10 |
| ndb_use_copying_alter_table | OFF |
| ndb_use_exact_count | ON |
| ndb_use_transactions | ON |
| net_buffer_length | 16384 |
| net_read_timeout | 30 |
| net_retry_count | 1000000 |
| net_write_timeout | 60 |
| new | OFF |
| old | OFF |
| old_alter_table | OFF |
| old_passwords | OFF |
| open_files_limit | 11095 |
| optimizer_prune_level | 1 |
| optimizer_search_depth | 62 |
| pid_file | /var/db/mysql/hostname.pid |
| plugin_dir | /usr/local/lib/mysql |
| port | 3306 |
| preload_buffer_size | 32768 |
| protocol_version | 10 |
| pseudo_thread_id | 1306 |
| query_alloc_block_size | 8192 |
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 0 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| query_prealloc_size | 8192 |
| rand_seed1 | |
| rand_seed2 | |
| range_alloc_block_size | 2048 |
| read_buffer_size | 131072 |
| read_only | OFF |
| read_rnd_buffer_size | 262144 |
| relay_log_purge | ON |
| relay_log_space_limit | 0 |
| rpl_recovery_rank | 0 |
| secure_auth | OFF |
| secure_file_priv | |
| server_id | 0 |
| skip_external_locking | ON |
| skip_networking | OFF |
| skip_show_database | OFF |
| slave_compressed_protocol | OFF |
| slave_load_tmpdir | /var/tmp/ |
| slave_net_timeout | 3600 |
| slave_skip_errors | OFF |
| slave_transaction_retries | 10 |
| slow_launch_time | 2 |
| slow_query_log | OFF |
| slow_query_log_file | /var/db/mysql/bsd-slow.log |
| socket | /tmp/mysql.sock |
| sort_buffer_size | 2097144 |
| sql_auto_is_null | ON |
| sql_big_selects | ON |
| sql_big_tables | OFF |
| sql_buffer_result | OFF |
| sql_log_bin | ON |
| sql_log_off | OFF |
| sql_log_update | ON |
| sql_low_priority_updates | OFF |
| sql_max_join_size | 18446744073709551615 |
| sql_mode | |
| sql_notes | ON |
| sql_quote_show_create | ON |
| sql_safe_updates | OFF |
| sql_select_limit | 18446744073709551615 |
| sql_slave_skip_counter | |
| sql_warnings | OFF |
| ssl_ca | |
| ssl_capath | |
| ssl_cert | |
| ssl_cipher | |
| ssl_key | |
| storage_engine | MyISAM |
| sync_binlog | 0 |
| sync_frm | ON |
| system_time_zone | ICT |
| table_definition_cache | 128 |
| table_lock_wait_timeout | 50 |
| table_open_cache | 64 |
| table_type | MyISAM |
| thread_cache_size | 0 |
| thread_handling | one-thread-per-connection |
| thread_stack | 262144 |
| time_format | %H:%i:%s |
| time_zone | SYSTEM |
| timed_mutexes | OFF |
| timestamp | 1216027603 |
| tmp_table_size | 16777216 |
| tmpdir | /var/tmp/ |
| transaction_alloc_block_size | 8192 |
| transaction_prealloc_size | 4096 |
| tx_isolation | REPEATABLE-READ |
| unique_checks | ON |
| updatable_views_with_limit | YES |
| version | 5.1.22-rc |
| version_comment | FreeBSD port: mysql-server-5.1.22 |
| version_compile_machine | amd64 |
| version_compile_os | portbld-freebsd7.0 |
| wait_timeout | 28800 |
| warning_count | 0 |
+-------------------------------------+-----------------------------------+
//////////////////////////////////////////////////
my.cnf
# Example MySQL config file for very large systems.
#
# This is for a large system with memory of 1G-2G where the system runs mainly
# MySQL.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/db/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 1M
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
innodb_file_per_table
default-character-set=tis620
skip-name-resolve
#innodb_file_per_table
skip-character-set-client-handshake
init_connect = 'SET NAMES tis620'
max_connections=1500
#
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /var/db/mysql/
innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
innodb_log_group_home_dir = /var/db/mysql/
#innodb_log_arch_dir = /var/db/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
allow-keywords
[mysql]
no-auto-rehash
default-character-set=tis620
# 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
////////////////////////////////////////////////
-
ลอง download mysql มาติดตั้งใหม่ครับ download จาก www.mysql.com นะครับ เอารุ่นสำหรับ FreeBSD
-
แบบ source ดีกว่าครับ แต่อาจจะใช้ เวลา compli นานนิดหนึ่ง
-
ขอบคุณอาจารย์ และ อ.doraemon(saiyok) มากคะ
กำลัง download คะ แต่คงต้องรอหัวหน้ามาลุยคะ ได้ผลอย่างไร ทางศูนย์คอมพิวเตอร์ รพ.พิจิตร จะแจ้งให้ทราบคะ
-
ขอบคุณครับ
ผมติดตั้งผ่าน ports tree ครับ ซึ่งผมลองมาทั้งสองอย่างแล้วครับ ไม่ผ่านทั้งสองอย่างเลย
ผมจะลองอย่างที่อ.ชัยพรบอกอีกทีละกันครับ
http://dev.mysql.com/downloads/mysql/5.1.html#source
Source downloads
Compressed GNU TAR archive (tar.gz) 5.1.26-rc 26.8M
หรือ
FreeBSD (TAR packages)
FreeBSD 6.x (x86_64) 5.1.26 103.6M
ผมเอามาจากนี้ครับ ถูกมั๊ยครับ
ถ้า compile เองผมทำดังนี้ครับ
ผมเอาไปเก็บที่ /tmp/mysql-5.1.25-rc.tar.gz
#gzip -cd mysql-5.1.25-rc.tar.gz | tar xvf -
#cd mysql-5.1.25-rc
#./configure --with-charset=tis620 --with-xcharset=all --with-collation=tis620_thai_ci --with-innodb
รอแป๊บหนึ่ง
#make WITH_CHARSET=tis620 WITH_XCHARSET=all WITH_COLLATION=tis620_thai_ci WITH_OPENSSL=yes BUILD_OPTIMIZED=yes WITH_ARCHIVE=yes WITH_FEDERATED=yes WITH_NDB=yes install clean
รอประมาณ 10 นาที
#/usr/local/bin/mysql_install_db
#adduser ----> ผมใช้ค่า default ทั้งหมดครับ
.
.
.
#chown -R mysql:mysql /usr/local/var
#/usr/local/bin/safe_mysqld & ------> ขั้นตอนนี้รู้สึกว่ามันจะขึ้น command not found
#/usr/local/share/mysql/mysql.server start ----> Starting MySQL Success!!!
ผม restart server >>>
# mysqladmin -u root password xxxxxxx
แล้วก็ยังไม่ได้ทำอะไรต่อครับ
เข้าไปดู
#pico /etc/my.cnf
เจอครับ แต่ยังไม่ได้เปิด option : innodb_file_per_table และยังไม่ได้เข้าไปเอา # ออก ในส่วนของ innodb_xxx ออกครับ ขอเข้าไปดู ในส่วนของ host.err, host.pid และไฟล์ที่ mysql สร้างก่อน
-
ขอบคุณครับ
ผมติดตั้งผ่าน ports tree ครับ ซึ่งผมลองมาทั้งสองอย่างแล้วครับ ไม่ผ่านทั้งสองอย่างเลย
ผมจะลองอย่างที่อ.ชัยพรบอกอีกทีละกันครับ
http://dev.mysql.com/downloads/mysql/5.1.html#source
Source downloads
Compressed GNU TAR archive (tar.gz) 5.1.26-rc 26.8M
หรือ
FreeBSD (TAR packages)
FreeBSD 6.x (x86_64) 5.1.26 103.6M
ผมเอามาจากนี้ครับ ถูกมั๊ยครับ
ถ้า compile เองผมทำดังนี้ครับ
ผมเอาไปเก็บที่ /tmp/mysql-5.1.25-rc.tar.gz
#gzip -cd mysql-5.1.25-rc.tar.gz | tar xvf -
#cd mysql-5.1.25-rc
#./configure --with-charset=tis620 --with-xcharset=all --with-collation=tis620_thai_ci --with-innodb
รอแป๊บหนึ่ง
#make WITH_CHARSET=tis620 WITH_XCHARSET=all WITH_COLLATION=tis620_thai_ci WITH_OPENSSL=yes BUILD_OPTIMIZED=yes WITH_ARCHIVE=yes WITH_FEDERATED=yes WITH_NDB=yes install clean
รอประมาณ 10 นาที
#/usr/local/bin/mysql_install_db
#adduser ----> ผมใช้ค่า default ทั้งหมดครับ
.
.
.
#chown -R mysql:mysql /usr/local/var
#/usr/local/bin/safe_mysqld & ------> ขั้นตอนนี้รู้สึกว่ามันจะขึ้น command not found
#/usr/local/share/mysql/mysql.server start ----> Starting MySQL Success!!!
ผม restart >>>
# mysqladmin -u root password xxxxxxx
ต้องการใช้ จริงๆๆ ผม remote ไปทำให้ก็ได้ครับ
อาทิตย์นี้ผมอยู่ เวร สี่วันครับ
หยุด ยาวๆๆ
-
ต้องการใช้ จริงๆๆ ผม remote ไปทำให้ก็ได้ครับ
อาทิตย์นี้ผมอยู่ เวร สี่วันครับ
หยุด ยาวๆๆ
โห...กะรวยเลยเหรอ หยุด 4 วัน ไม่ไปไหนเลย อยู่เวรอย่างเดียว
ระวังเงินทับตามนะ 555555555
-
อ.อ๊อดครับ อยู่เวรสี่วันเลยจะมีเวลาหรือครับ ผมก็อยู่ห้องยาสี่วันเลยครับ แต่คงกระดิกไปไหนไม่ได้ครับ แต่ถ้าอยู่เวรศูนย์คอมฯ คงทำได้ครับ ขอบคุณครับ
-
ตอนเย็นๆๆ ครับ
ลง แต่ freebsd 7.0 ไว้แล้วกัน
แล้วเปิด remote windows ไว้ตัวหนึ่ง แล้วผมจะ remote ไป freebsd อีกที่
-
ผมเข้าไปดู /usr/local/var พบ file
hostname.err ------>ไม่มีข้อมูล แต่เป็นไฟล์ที่อยากให้มี
hostname.err-old -----> มีข้อมูล แต่ไม่อยากเจอเลยไฟล์นี้
hostname.pid
ib_logfile0 -----> ขนาดไฟล์ 5MB ตาม my.cnf
ib_logfile1 -----> ขนาดไฟล์ 5MB ตาม my.cnf
ibdata1 -----> ขนาดไฟล์ 10MB ตาม my.cnf ไฟล์นี้แหละน่าจะมีปัญหา เมื่อเปิดใช้ innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
mysql-bin.000001
mysql-bin.000002
mysql-bin.index
หลังจากเปิด ใช้โดยเอา # ข้างหน้า innodb_xxx ออก จะเป็นยังงัย
รอดูผลครับ
restart server ครับ
-
ผมเข้าไปดู /usr/local/var ครั้งที่ สอง
hostname.err ------>ไม่มีข้อมูล
hostname.err-old -----> มีข้อมูล
hostname.pid
ib_logfile0 -----> ขนาดไฟล์ 5MB ตาม my.cnf
ib_logfile1 -----> ขนาดไฟล์ 5MB ตาม my.cnf
ibdata1 -----> ขนาดไฟล์ 2000MB ตามการเปิดใช้
innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
แต่ไม่มีการสร้าง ibdata2
mysql-bin.000001
mysql-bin.000002
mysql-bin.000003 ------> เพิ่มมา
mysql-bin.000004 ------> เพิ่มมา
mysql-bin.index
หลังจากผมลบ
ibdata1
mysql-bin.000001
mysql-bin.000002
mysql-bin.000003
mysql-bin.000004
restart server ครับ
ได้ผล
hostname.err ------>ไม่มีข้อมูล
hostname.err-old -----> มีข้อมูล
hostname.pid
ib_logfile0 -----> ขนาดไฟล์ 5MB ตาม my.cnf
ib_logfile1 -----> ขนาดไฟล์ 5MB ตาม my.cnf
ibdata1 -----> ขนาดไฟล์ 2000MB
ibdata2 -----> ถูกสร้างขึ้นมา ขนาดไฟล์ 10MB
mysql-bin.000001
mysql-bin.000002
mysql-bin.index
ถ้าเข้าไปดูใน
hostname.err-old จะพบว่า
Error: log file /usr/local/var/ib_logfile0 is of different size 0 5242880 bytes
than specified in the .cnf file 0 104857600 bytes!
ผมจะลบ
ib_logfile0
ib_logfile1
ibdata1
ibdata2
mysql-bin.000001
mysql-bin.000002
restart server แล้วดูผลครับ
// ผมมานั่งคิดดูว่า ผมน่าจะแก้ไขไฟล์ my.cnf ตั้งแต่ก่อน restart server ครั้งแรกแล้ว มันเลยไม่แหล่ม !!!
-
ผลครับ
MySQL ไม่สามารถ start daemon ได้เลยตั้งแต่ตอน boot เลยครับ
??? ???
นับหนึ่งใหม่ครับ
เจอกันพรุ่งนี้ครับ
-
วันนี้กลับมาตามสัญญาครับ
การติดตั้งแบบ compile source distribution เป็นไปด้วยดีครับ
แต่ อย่างว่าครับ ---> ;D
รบกวน อ. ชัยพรครับ
ตอนนี้ innodb engine ใช้ได้แล้วครับ แต่.... :'( variable innodb_file_per_table ไม่ถูกเปิดใช้งานครับ
ถ้าจะให้ผมแก้ /etc/my.cnf ก็ไม่มีไฟล์นี้ครับ
ผมถามหน่อยครับ แล้ว MySQL เอา variables จากที่ไหนมาทำงานครับ (ไม่รู้จริง ๆครับ)
mysql> show variables;
+---------------------------------+----------------------------------+
| Variable_name | Value |
+---------------------------------+----------------------------------+
| auto_increment_increment | 1 |
| auto_increment_offset | 1 |
| autocommit | ON |
| automatic_sp_privileges | ON |
| back_log | 50 |
| basedir | /usr/local/ |
| big_tables | OFF |
| binlog_cache_size | 32768 |
| binlog_format | MIXED |
| bulk_insert_buffer_size | 8388608 |
| character_set_client | tis620 |
| character_set_connection | tis620 |
| character_set_database | tis620 |
| character_set_filesystem | binary |
| character_set_results | tis620 |
| character_set_server | tis620 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/share/mysql/charsets/ |
| collation_connection | tis620_thai_ci |
| collation_database | tis620_thai_ci |
| collation_server | tis620_thai_ci |
| completion_type | 0 |
| concurrent_insert | 1 |
| connect_timeout | 10 |
| datadir | /usr/local/var/ |
| date_format | %Y-%m-%d |
| datetime_format | %Y-%m-%d %H:%i:%s |
| default_week_format | 0 |
| delay_key_write | ON |
| delayed_insert_limit | 100 |
| delayed_insert_timeout | 300 |
| delayed_queue_size | 1000 |
| div_precision_increment | 4 |
| engine_condition_pushdown | ON |
| error_count | 0 |
| event_scheduler | OFF |
| expire_logs_days | 0 |
| flush | OFF |
| flush_time | 0 |
| foreign_key_checks | ON |
| ft_boolean_syntax | + -><()~*:""&| |
| ft_max_word_len | 84 |
| ft_min_word_len | 4 |
| ft_query_expansion_limit | 20 |
| ft_stopword_file | (built-in) |
| general_log | OFF |
| general_log_file | /usr/local/var/host.log |
| group_concat_max_len | 1024 |
| have_community_features | NO |
| have_compress | YES |
| have_crypt | YES |
| have_csv | YES |
| have_dynamic_loading | YES |
| have_geometry | YES |
| have_innodb | YES |
| have_ndbcluster | NO |
| have_openssl | NO |
| have_partitioning | NO |
| have_query_cache | YES |
| have_rtree_keys | YES |
| have_ssl | NO |
| have_symlink | YES |
| hostname | hostname |
| identity | 0 |
| init_connect | |
| init_file | |
| init_slave | |
| innodb_adaptive_hash_index | ON |
| innodb_additional_mem_pool_size | 1048576 |
| innodb_autoextend_increment | 8 |
| innodb_autoinc_lock_mode | 1 |
| innodb_buffer_pool_size | 8388608 |
| innodb_checksums | ON |
| innodb_commit_concurrency | 0 |
| innodb_concurrency_tickets | 500 |
| innodb_data_file_path | ibdata1:10M:autoextend |
| innodb_data_home_dir | |
| innodb_doublewrite | ON |
| innodb_fast_shutdown | 1 |
| innodb_file_io_threads | 4 |
| innodb_file_per_table | OFF |
| innodb_flush_log_at_trx_commit | 1 |
| innodb_flush_method | |
| innodb_force_recovery | 0 |
| innodb_lock_wait_timeout | 50 |
| innodb_locks_unsafe_for_binlog | OFF |
| innodb_log_buffer_size | 1048576 |
| innodb_log_file_size | 5242880 |
| innodb_log_files_in_group | 2 |
| innodb_log_group_home_dir | ./ |
| innodb_max_dirty_pages_pct | 90 |
| innodb_max_purge_lag | 0 |
| innodb_mirrored_log_groups | 1 |
| innodb_open_files | 300 |
| innodb_rollback_on_timeout | OFF |
| innodb_support_xa | ON |
| innodb_sync_spin_loops | 20 |
| innodb_table_locks | ON |
| innodb_thread_concurrency | 8 |
| innodb_thread_sleep_delay | 10000 |
| insert_id | 0 |
| interactive_timeout | 28800 |
| join_buffer_size | 131072 |
| keep_files_on_create | OFF |
| key_buffer_size | 8388600 |
| key_cache_age_threshold | 300 |
| key_cache_block_size | 1024 |
| key_cache_division_limit | 100 |
| language | /usr/local/share/mysql/english/ |
| large_files_support | ON |
| large_page_size | 0 |
| large_pages | OFF |
| last_insert_id | 0 |
| lc_time_names | en_US |
| license | GPL |
| local_infile | ON |
| locked_in_memory | OFF |
| log | OFF |
| log_bin | OFF |
| log_bin_trust_function_creators | OFF |
| log_bin_trust_routine_creators | OFF |
| log_error | /usr/local/var/hostname.err |
| log_output | FILE |
| log_queries_not_using_indexes | OFF |
| log_slave_updates | OFF |
| log_slow_queries | OFF |
| log_warnings | 1 |
| long_query_time | 10.000000 |
| low_priority_updates | OFF |
| lower_case_file_system | OFF |
| lower_case_table_names | 0 |
| max_allowed_packet | 1048576 |
| max_binlog_cache_size | 18446744073709551615 |
| max_binlog_size | 1073741824 |
| max_connect_errors | 10 |
| max_connections | 151 |
| max_delayed_threads | 20 |
| max_error_count | 64 |
| max_heap_table_size | 16777216 |
| max_insert_delayed_threads | 20 |
| max_join_size | 18446744073709551615 |
| max_length_for_sort_data | 1024 |
| max_prepared_stmt_count | 16382 |
| max_relay_log_size | 0 |
| max_seeks_for_key | 18446744073709551615 |
| max_sort_length | 1024 |
| max_sp_recursion_depth | 0 |
| max_tmp_tables | 32 |
| max_user_connections | 0 |
| max_write_lock_count | 18446744073709551615 |
| min_examined_row_limit | 0 |
| multi_range_count | 256 |
| myisam_data_pointer_size | 6 |
| myisam_max_sort_file_size | 9223372036854775807 |
| myisam_recover_options | OFF |
| myisam_repair_threads | 1 |
| myisam_sort_buffer_size | 8388608 |
| myisam_stats_method | nulls_unequal |
| myisam_use_mmap | OFF |
| net_buffer_length | 16384 |
| net_read_timeout | 30 |
| net_retry_count | 1000000 |
| net_write_timeout | 60 |
| new | OFF |
| old | OFF |
| old_alter_table | OFF |
| old_passwords | OFF |
| open_files_limit | 11095 |
| optimizer_prune_level | 1 |
| optimizer_search_depth | 62 |
| pid_file | /usr/local/var/hostname.pid |
| plugin_dir | /usr/local/lib/mysql/plugin |
| port | 3306 |
| preload_buffer_size | 32768 |
| protocol_version | 10 |
| pseudo_thread_id | 1 |
| query_alloc_block_size | 8192 |
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 0 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| query_prealloc_size | 8192 |
| rand_seed1 | |
| rand_seed2 | |
| range_alloc_block_size | 4096 |
| read_buffer_size | 131072 |
| read_only | OFF |
| read_rnd_buffer_size | 262144 |
| relay_log | |
| relay_log_index | |
| relay_log_info_file | relay-log.info |
| relay_log_purge | ON |
| relay_log_space_limit | 0 |
| report_host | |
| report_password | |
| report_port | 3306 |
| report_user | |
| rpl_recovery_rank | 0 |
| secure_auth | OFF |
| secure_file_priv | |
| server_id | 0 |
| skip_external_locking | ON |
| skip_networking | OFF |
| skip_show_database | OFF |
| slave_compressed_protocol | OFF |
| slave_exec_mode | STRICT |
| slave_load_tmpdir | /var/tmp/ |
| slave_net_timeout | 3600 |
| slave_skip_errors | OFF |
| slave_transaction_retries | 10 |
| slow_launch_time | 2 |
| slow_query_log | OFF |
| slow_query_log_file | /usr/local/var/host-slow.log |
| socket | /tmp/mysql.sock |
| sort_buffer_size | 2097144 |
| sql_auto_is_null | ON |
| sql_big_selects | ON |
| sql_big_tables | OFF |
| sql_buffer_result | OFF |
| sql_log_bin | ON |
| sql_log_off | OFF |
| sql_log_update | ON |
| sql_low_priority_updates | OFF |
| sql_max_join_size | 18446744073709551615 |
| sql_mode | |
| sql_notes | ON |
| sql_quote_show_create | ON |
| sql_safe_updates | OFF |
| sql_select_limit | 18446744073709551615 |
| sql_slave_skip_counter | |
| sql_warnings | OFF |
| ssl_ca | |
| ssl_capath | |
| ssl_cert | |
| ssl_cipher | |
| ssl_key | |
| storage_engine | MyISAM |
| sync_binlog | 0 |
| sync_frm | ON |
| system_time_zone | ICT |
| table_definition_cache | 256 |
| table_lock_wait_timeout | 50 |
| table_open_cache | 64 |
| table_type | MyISAM |
| thread_cache_size | 0 |
| thread_handling | one-thread-per-connection |
| thread_stack | 262144 |
| time_format | %H:%i:%s |
| time_zone | SYSTEM |
| timed_mutexes | OFF |
| timestamp | 1216129916 |
| tmp_table_size | 16777216 |
| tmpdir | /var/tmp/ |
| transaction_alloc_block_size | 8192 |
| transaction_prealloc_size | 4096 |
| tx_isolation | REPEATABLE-READ |
| unique_checks | ON |
| updatable_views_with_limit | YES |
| version | 5.1.26-rc |
| version_comment | Source distribution |
| version_compile_machine | amd64 |
| version_compile_os | unknown-freebsd7.0 |
| wait_timeout | 28800 |
| warning_count | 0 |
+---------------------------------+----------------------------------+
ถ้าผมทำตามด้านล่างนี้ จะทำให้ไม่สามารถรัน daemon mysql ได้ครับ
#cp /usr/local/share/mysql/my-huge.cnf /etc/my.cnf
#chown root:sys /etc/my.cnf
#chmod 644 /etc/my.cnf
แล้วก็ไปแก้ไขไฟล์ /etc/my.cnf เพิ่ม
innodb_file_per_table
และเอา # ในส่วนของ innodb_xxxxx ออก
ตอนนี้ยังไม่ได้ทำอะไรต่อครับ
-
ดู log ไฟล์ หรือยังว่าทำงานไม่ได้เพราะอะไร
-
เหมือนเดิม ใน HOSxP ขึ้น warning 4 บอกว่ายังไม่ได้เปิด innodb_file_per_table
อย่างที่บอกตอนท้ายครับ ว่า ผมเข้าไปแก้ my.cnf แล้ว รัน mysql ไม่ได้ตั้งแต่ boot ครับ
ณ. ตอนนี้ผมก็ไม่รู้ว่า mysql เอา variable จากที่ไหนมาทำงานทั้ง ๆที่ผมยังไม่ได้แก้ไขไฟล์ my.cnf เลย
-
ถ้าหมายถึง hostname.err ของ mysql ตามนี้ครับ
080715 20:38:17 mysqld_safe Starting mysqld daemon with databases from /usr/local/var
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
080715 20:38:17 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
080715 20:38:19 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
080715 20:38:19 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
080715 20:38:21 InnoDB: Started; log sequence number 0 0
080715 20:38:21 [Note] Event Scheduler: Loaded 0 events
080715 20:38:21 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.1.26-rc' socket: '/tmp/mysql.sock' port: 3306 Source distribution
080715 20:43:17 mysqld_safe A mysqld process already exists
080715 20:45:40 [Note] /usr/local/libexec/mysqld: Normal shutdown
080715 20:45:40 [Note] Event Scheduler: Purging the queue. 0 events
080715 20:45:40 InnoDB: Starting shutdown...
080715 20:45:41 InnoDB: Shutdown completed; log sequence number 0 46409
080715 20:45:41 [Note] /usr/local/libexec/mysqld: Shutdown complete
080715 20:45:41 mysqld_safe mysqld from pid file /usr/local/var/hostname.pid ended
080715 20:47:33 mysqld_safe Starting mysqld daemon with databases from /usr/local/var
080715 20:47:34 InnoDB: Started; log sequence number 0 46409
080715 20:47:34 [Note] Event Scheduler: Loaded 0 events
080715 20:47:34 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.1.26-rc' socket: '/tmp/mysql.sock' port: 3306 Source distribution
Status information:
Current dir: /usr/local/var/
Running threads: 0 Stack size: 262144
Current locks:
lock: 0x8033f1368:
lock: 0x8033a4368:
lock: 0x8033d7368:
lock: 0x8033a2368:
lock: 0x8033ad368:
lock: 0x8029ff368:
lock: 0x8027ff368:
lock: 0x8024ff368:
Key caches:
default
Buffer_size: 8388600
Block_size: 1024
Division_limit: 100
Age_limit: 300
blocks used: 0
not flushed: 0
w_requests: 0
writes: 0
r_requests: 0
reads: 0
handler status:
read_key: 0
read_next: 0
read_rnd 0
read_first: 3
write: 0
delete 0
update: 0
Table status:
Opened tables: 15
Open tables: 8
Open files: 16
Open streams: 0
Alarm status:
Active alarms: 0
Max used alarms: 0
Next alarm time: 0
Begin safemalloc memory dump:
End safemalloc memory dump.
Events status:
LLA = Last Locked At LUA = Last Unlocked At
WOC = Waiting On Condition DL = Data Locked
Event scheduler status:
State : INITIALIZED
Thread id : 0
LLA : n/a:0
LUA : n/a:0
WOC : NO
Workers : 0
Executed : 0
Data locked: NO
Event queue status:
Element count : 0
Data locked : NO
Attempting lock : NO
LLA : init_queue:132
LUA : init_queue:142
WOC : NO
Next activation : never
-
ไปที่
/usr/local/var
รันทำสั่งที่
rm -R ib*
ลบ ไฟล์ที่ขีึ้นต้นด้วย ib ออกให้หมด
แล้ว stop start mysql ใหม่
-
ผมลองมาหลายรอบแล้วครับ อ.อ๊อด ไม่ขึ้นครับ
เดี๋ยวไปลองกับ VM ที่บ้านอีกทีครับ
ตอนนี้ขอกลับบ้านไปกินข้าวก่อน เจอกันที่บ้านครับ (บ้านใครบ้านมัน) แหม..มันน่ามีเบียร์สักเหยือกนะ :P
-
ผมลองมาหลายรอบแล้วครับ อ.อ๊อด ไม่ขึ้นครับ
เดี๋ยวไปลองกับ VM ที่บ้านอีกทีครับ
ตอนนี้ขอกลับบ้านไปกินข้าวก่อน เจอกันที่บ้านครับ (บ้านใครบ้านมัน) แหม..มันน่ามีเบียร์(มีเมีย)สักเหยือกนะ :P
;D
-
ลืมไปเรื่องหนึ่ง
ไม่ทราบว่าไปเปิด port 3306
หรือยังครับ
เพราะว่า freebsd มันปิด port ทุกอัน จะใช้อะไรต้องเปิดก่อนนะครับ
-
ลองตามนี้ครับ
http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=5205.0
;D ;D ;D
-
อ้อใช้ ลืมไปเลยว่ามีคนเลยทำไว้แล้ว
;D ;D ;D
ผมกำลังจะเปลียนไปใช้ centos 5.2 แทนแล้วครับเครื่องใหม่
เพราะว่าต้องสอนน้อง it ให้ทำเองได้
;D
-
แล้วเจอกันที่ >>>>>http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=6183.0
นะครับ อ. อ๊อด
-
PHPNuke ผมไม่ใช้แล้วครับ
เพราะว่า มีคนเจาะ ได้มากแล้ว
ไปใช้ตัวอื่น แล้วครับ
-
ขอบคุณครับ คุณตะนอย แต่ยังไม่ได้ช่วยแก้ปัญหานี้ครับ
ผมขอให้คุณตะนอย or อ.อ๊อด and อ.นาจ = true พิจารณาให้ละเอียดอีกทีครับ
ผมกำลังสงสัยว่า mysql เอา variable จากไหนมารัน ในเมื่อผมไม่ได้เอาไฟล์ my.cnf ไปไว้ที่ /etc/my.cnf และผมก็ไม่ได้ cp /usr/local/share/mysql/my-huge.cnf /etc/my.cnf ด้วย
และผมเคยลอง cp /usr/local/share/mysql/my-huge.cnf /etc/my.cnf
และแก้ไขไฟล์ my.cnf โดยเปิด option innodb_xxx มันรัน mysql ไม่ได้
ขอยกสักแก้วนะครับ ...เอื๊อก....
-
ขอบคุณครับ คุณตะนอย แต่ยังไม่ได้ช่วยแก้ปัญหานี้ครับ
ผมขอให้คุณตะนอย or อ.อ๊อด and อ.นาจ = true พิจารณาให้ละเอียดอีกทีครับ
ผมกำลังสงสัยว่า mysql เอา variable จากไหนมารัน ในเมื่อผมไม่ได้เอาไฟล์ my.cnf ไปไว้ที่ /etc/my.cnf และผมก็ไม่ได้ cp /usr/local/share/mysql/my-huge.cnf /etc/my.cnf ด้วย
และผมเคยลอง cp /usr/local/share/mysql/my-huge.cnf /etc/my.cnf
และแก้ไขไฟล์ my.cnf โดยเปิด option innodb_xxx มันรัน mysql ไม่ได้
ขอยกสักแก้วนะครับ ...เอื๊อก....
ถ้า FreeBSD ลงแล้ว config ไม่ได้ ก็เปลี่ยนมาเป็น CentOS ก็ได้นะครับ 5 5 5 5 5 5 5 5 5 :D :D :D :D ;D ;D ;D
-
Server จริงของเราเป็น CentOS อยู่แล้วคะ แต่จะทดสอบใช้ FreeBSD ในเครื่องสำรองคะ ถ้าดี ก็จะเปลี่ยนจาก CentOS ==> FreeBSD คะ (เป็นคำสั่งของคุณหมอ หัวหน้าศูนย์คอมพิวเตอร์ ;D)
-
ผมว่าถนัดอันไหนก็น่าจะเอาอันนั้น เพราะมีปัญหามาน่าจะพอแก้ไขได้ .....อันนี้ก็ขึ้นกับความชอบพอ ของแต่ละท่านครับ............. ;D ;D ;D ;D ;D ;D ;D ;D
-
ผมก็เคยลองติดตั้ง freebsd อยู่พักหนึ่ง ประมาณ 2 เดือน ติดตั้ง mysql มันใช้เวลานานพอสมควร
พอดีผมเป็นคนใจร้อน ก็เลยหันกลับหยิบ centos อีกครั้งหนึ่ง ติดตั้ง mysql โดยใช้ไฟล์ RPM ใช้เวลา ไม่ถึง นาที ประมาณนั้น..............5 5 5 5 5 555 ;D ;D ;D ;D ;D :D :D :D :D
-
ลองเอาอันนี้ไปปรับดูครับ ผมใช้อยู่ ไม่ฟ้องครับ
-
ตอนนี้ผม เปิดใช้ variable innodb_file_per_table ใน mysql-5.1.26-rc ได้แล้วครับ กำลัง initial import ข้อมูลเข้าไปอยู่ครับ
have_innodb | YES |
| have_ndbcluster | NO |
| have_openssl | NO |
| have_partitioning | NO |
| have_query_cache | YES |
| have_rtree_keys | YES |
| have_ssl | NO |
| have_symlink | YES |
| hostname | hostname |
| identity | 0 |
| init_connect | SET NAME tis620 |
| init_file | |
| init_slave | |
| innodb_adaptive_hash_index | ON |
| innodb_additional_mem_pool_size | 20971520 |
| innodb_autoextend_increment | 8 |
| innodb_autoinc_lock_mode | 1 |
| innodb_buffer_pool_size | 402653184 |
| innodb_checksums | ON |
| innodb_commit_concurrency | 0 |
| innodb_concurrency_tickets | 500 |
| innodb_data_file_path | ibdata1:2000M;ibdata2:10M:autoextend |
| innodb_data_home_dir | /usr/local/var/ |
| innodb_doublewrite | ON |
| innodb_fast_shutdown | 1 |
| innodb_file_io_threads | 4 |
| innodb_file_per_table | ON |
| innodb_flush_log_at_trx_commit | 1 |
| innodb_flush_method | |
| innodb_force_recovery | 0 |
| innodb_lock_wait_timeout | 50 |
| innodb_locks_unsafe_for_binlog | OFF |
| innodb_log_buffer_size | 8388608 |
| innodb_log_file_size | 104857600 |
| innodb_log_files_in_group | 2 |
| innodb_log_group_home_dir | /usr/local/var/ |
| innodb_max_dirty_pages_pct | 90 |
| innodb_max_purge_lag | 0 |
| innodb_mirrored_log_groups | 1 |
| innodb_open_files | 300 |
| innodb_rollback_on_timeout | OFF |
| innodb_support_xa | ON |
| innodb_sync_spin_loops | 20 |
| innodb_table_locks | ON |
| innodb_thread_concurrency | 8 |
| innodb_thread_sleep_delay | 10000 |
ถ้าเสร็จแล้ว จะดูว่า warning 4 ของ HOSxP จะขึ้นมั๊ยนะครับ
:D ;D
-
ผมใช้ไฟล์นี้ครับ ปรับแล้ว daemon MySQL ......SUCCESS!!!
อย่างน้อยก็มีกำลังใจที่จะ initial import แล้วละครับ อ.อ๊อด อ.ชัยพร ขอบคุณครับ
-
สุดยอด
แล้วใครจะเจาะได้
;D ;D
-
initial import เสร็จแล้วครับ ใช้เวลาประมาณ 3 ชั่วโมง ครึ่ง ครับ
ก่อนใช้ก็ทำ mysql> SET GLOBAL log_bin_trust_function_creators=1;
ไม่มี warning 4 ให้เห็นอีกแล้ว ครับ พี่น้อง
จากนี้ไป ก็จะมี SLAVE ที่ run mysql-5.1.26-rc บน FreeBSD 7- 64 bit เพิ่มมาอีกตัว
ไม่รู้จะหลบคนเจาะได้หรือป่าวหนอ.......อ.ชัยพร ;)
-
ได้ปรับแก้ my.cnf อีกนิดหนึ่งโดยปรับและเพิ่ม เพราะ
ได้ลอง replicate แล้วมี error เกี่ยวกับ illegal mixed ของ tis620_thai_ci กับ latin1_swedich
[mysqld]
table_cache = 1000 ---------> เดิม 512
default-character-set=tis620
skip-name-resolve
skip-character-set-client-handshake
[mysqldump]
allow-keywords
[mysql]
default-character-set=tis620
-
;D ;D ;D อ่านกระทู้เก่าๆแล้วเห็นพัฒนาการจริงๆ