BMS-HOSxP Community
		HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: komanp ที่ พฤศจิกายน 29, 2008, 19:56:19 PM
		
			
			- 
				เป็นเพราะอะไรครับ
 ผมอยากจะอัพแค่ไม่กี่ตาราง
 พอคลิ๊กที่ Up innodb แล้วมันขึ้นแบบนี้
 ต้องทำไงครับ
- 
				my.cnf
 แรม  1 g
 [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 = 64M
 table_cache = 1000
 sort_buffer_size = 2M
 read_buffer_size = 2M
 read_rnd_buffer_size = 8M
 myisam_sort_buffer_size = 128M
 thread_cache = 8
 query_cache_size= 64M
 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-connection = 1000
 innodb_data_home_dir = /var/lib/mysql/
 innodb_data_file_path = ibdata1:10M:autoextend
 innodb_log_group_home_dir = /var/lib/mysql/
 #############################   mysql 5.1.X
 #innodb_log_arch_dir = /var/lib/mysql/
 #############################
 innodb_buffer_pool_size = 614M
 innodb_additional_mem_pool_size = 20M
 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
 
 [isamchk]
 key_buffer = 256M
 sort_buffer_size = 256M
 read_buffer = 2M
 write_buffer = 2M
 
 [myisamchk]
 key_buffer = 400M
 sort_buffer_size = 256M
 read_buffer = 2M
 write_buffer = 2M
 
 [mysqlhotcopy]
 interactive-timeout
 
- 
				my.cnf 2 G
 [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 = 1024M
 max_allowed_packet = 256M
 table_cache = 2000
 sort_buffer_size = 1M
 read_buffer_size = 1M
 read_rnd_buffer_size = 1M
 myisam_sort_buffer_size = 256M
 thread_cache = 8
 query_cache_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'
 max-connection = 2000
 innodb_data_home_dir = /var/lib/mysql/
 innodb_data_file_path = ibdata1:100M:autoextend
 innodb_log_group_home_dir = /var/lib/mysql/
 #############################   mysql 5.1.X
 #innodb_log_arch_dir = /var/lib/mysql/
 #############################
 innodb_buffer_pool_size = 1638M
 innodb_additional_mem_pool_size = 24M
 innodb_log_file_size = 64M
 innodb_log_buffer_size = 20M
 innodb_flush_log_at_trx_commit = 1
 innodb_lock_wait_timeout = 50
 innodb_thread_concurrency = 0
 
 [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 = 200M
 sort_buffer_size = 128M
 read_buffer = 2M
 write_buffer = 2M
 
 [mysqlhotcopy]
 interactive-timeout
 
- 
				ต้องแก้ my.cnf ครับ
			
- 
				เป็นเนื่องจาก my.cnf มีการตั้งค่าที่น้อยเกินไปใน innodb ครับ
 เพราะตอนนี้ server HOSXPต้องการ ram อย่างต่ำ 2 GB ครับ และเครื่องลูก ต้องการ 512 MB
 
- 
				ส่ง log file ของ mysql เข้ามาด้วยครับ
			
- 
				รบกวนด้วยครับ
 ตอนนี้ผมใช้งาน hosxp ที่ server ไม่ได้เลย
 เพราะไปอัพให้เป็น innodb ต้องเอาข้อมูลสำรองมาใช้ครับตอนนี้
 ดีที่เมื่อวานคนไข้ไม่เยอะ
 ข้อมูลเลยหายไม่เท่าไหร่
 ตอนนี้เอาข้อมูลสำรองมาใช้ก่อนใน server สำรอง
 #
 # The MySQL database server configuration file.
 #
 # You can copy this to one of:
 # - "/etc/mysql/my.cnf" to set global options,
 # - "~/.my.cnf" to set user-specific options.
 #
 # One can use all long options that the program supports.
 # Run program with --help to get a list of available options and with
 # --print-defaults to see which it would actually understand and use.
 #
 # For explanations see
 # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
 
 # This will be passed to all mysql clients
 # It has been reported that passwords should be enclosed with ticks/quotes
 # escpecially if they contain "#" chars...
 # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
 [client]
 port      = 3306
 socket      = /var/run/mysqld/mysqld.sock
 
 # Here is entries for some specific programs
 # The following values assume you have at least 32M ram
 
 # This was formally known as [safe_mysqld]. Both versions are currently parsed.
 [mysqld_safe]
 socket      = /var/run/mysqld/mysqld.sock
 nice      = 0
 
 [mysqld]
 #
 # * Basic Settings
 #
 user      = mysql
 pid-file   = /var/run/mysqld/mysqld.pid
 socket      = /var/run/mysqld/mysqld.sock
 port      = 3306
 basedir      = /usr
 table_cache     = 400
 sort_buffer_size = 1M
 read_rnd_buffer_size = 4M
 myisam_sort_buffer_size = 1000M
 query_cache_size = 16M
 datadir      = /var/lib/mysql
 tmpdir      = /tmp
 language   = /usr/share/mysql/english
 default-character-set=tis620
 innodb_file_per_table
 #skip-external-locking
 #
 # Instead of skip-networking the default is now to listen only on
 # localhost which is more compatible and is not less secure.
 bind-address      = 192.168.2.9
 #
 # * Fine Tuning
 #
 key_buffer      = 900M
 max_allowed_packet   = 16M
 thread_stack      = 128K
 thread_cache_size   = 8
 #max_connections        = 100
 #table_cache            = 64
 #thread_concurrency     = 10
 #
 # * Query Cache Configuration
 #
 query_cache_limit       = 1M
 query_cache_size        = 16M
 #
 # * Logging and Replication
 #
 # Both location gets rotated by the cronjob.
 # Be aware that this log type is a performance killer.
 #log      = /var/log/mysql/mysql.log
 #
 # Error logging goes to syslog. This is a Debian improvement :)
 #
 # Here you can see queries with especially long duration
 #log_slow_queries   = /var/log/mysql/mysql-slow.log
 #long_query_time = 2
 #log-queries-not-using-indexes
 #
 # The following can be used as easy to replay backup logs or for replication.
 # note: if you are setting up a replication slave, see README.Debian about
 #       other settings you may need to change.
 #server-id      = 1
 log_bin         = /var/log/mysql/mysql-bin.log
 # WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian!
 expire_logs_days   = 10
 max_binlog_size         = 100M
 #binlog_do_db      = include_database_name
 #binlog_ignore_db   = include_database_name
 #
 # * BerkeleyDB
 #
 # Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
 skip-bdb
 #
 # * InnoDB
 #
 # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
 # Read the manual for more InnoDB related options. There are many!
 # You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
 #skip-innodb
 #
 # * Security Features
 #
 # Read the manual, too, if you want chroot!
 # chroot = /var/lib/mysql/
 #
 # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
 #
 # ssl-ca=/etc/mysql/cacert.pem
 # ssl-cert=/etc/mysql/server-cert.pem
 # ssl-key=/etc/mysql/server-key.pem
 
 
 
 [mysqldump]
 quick
 quote-names
 max_allowed_packet   = 16M
 
 [mysql]
 default-character-set=tis620
 #no-auto-rehash   # faster start of mysql but no tab completition
 
 [isamchk]
 key_buffer      = 16M
 
 #
 # * NDB Cluster
 #
 # See /usr/share/doc/mysql-server-*/README.Debian for more information.
 #
 # The following configuration is read by the NDB Data Nodes (ndbd processes)
 # not from the NDB Management Nodes (ndb_mgmd processes).
 #
 # [MYSQL_CLUSTER]
 # ndb-connectstring=127.0.0.1
 
 
 #
 # * IMPORTANT: Additional settings that can override those from this file!
 #
 !includedir /etc/mysql/conf.d/
 
- 
				ขอ log file ด้วยครับ
 
 /var/lib/mysql/hostname.err
- 
				format ทิ้งเรียบร้อยแล้วครับ
 ตอนนี้ติดตั้ง ubuntu 8.10
 รู้สึกว่าไม่รองรับ raid5 ของ raid hardware
- 
				ลองนำไปใช้ดู
 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 = 256M
 max_allowed_packet = 128M
 table_cache = 1000
 sort_buffer_size = 1M
 read_buffer_size = 1M
 read_rnd_buffer_size = 1M
 myisam_sort_buffer_size = 256M
 thread_cache = 8
 query_cache_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'
 max-connection = 1000
 innodb_data_home_dir = /var/lib/mysql/
 innodb_data_file_path = ibdata1:100M:autoextend
 innodb_log_group_home_dir = /var/lib/mysql/
 #############################   mysql 5.1.X
 #innodb_log_arch_dir = /var/lib/mysql/
 #############################
 innodb_buffer_pool_size = 1024M
 innodb_additional_mem_pool_size = 24M
 innodb_log_file_size = 64M
 innodb_log_buffer_size = 8M
 innodb_flush_log_at_trx_commit = 1
 innodb_lock_wait_timeout = 50
 innodb_thread_concurrency = 0
 
 [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 = 200M
 sort_buffer_size = 128M
 read_buffer = 2M
 write_buffer = 2M
 
 [mysqlhotcopy]
 interactive-timeout
 
- 
				ถ้าเป็นแรม 4 gb ครับ ต้องใช้ my.cnf ตัวไหนครับ
			
- 
				ถ้าเป็นแรม 4 gb ครับ ต้องใช้ my.cnf ตัวไหนครับ
 
 -มียอดคนไข้วันละเท่าไร
 -มีเครื่องลูกก็เครื่องที่ใช้ hosxp
 -cpu อะไร
 -ขอสเปค server
 -เป็น innodb หรือยัง
 -ระบบแลนเป็น 10/100 หรือ 10/100/1000