วิธีแก้ปัญหาทีม TSส่ง lv2 วิธีแก้ปัญหาทีม SYSNOC หรือ ITSตัวอย่างที่พบใน เครื่อง zabbix2.netway.co.th (ใช้ mariadb) 1. performance_schema has wrong structure 130929 22:35:53 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 130929 22:35:53 [Note] Server socket created on IP: '::'. 130929 22:35:53 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it 130929 22:35:53 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist 130929 22:35:53 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure 130929 22:35:53 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure 130929 22:35:53 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has …….. 130929 22:35:53 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure 130929 22:35:53 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure 130929 22:35:53 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure 130929 22:35:53 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure ….. 130929 22:35:53 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MariaDB 50077, now running 5532. Please use mysql_upgrade to fix this error. 130929 22:35:53 [ERROR] mysql.user has no `Event_priv` column at position 29 130929 22:35:53 [ERROR] Cannot open mysql.event 130929 22:35:53 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. วิธีแก้ไข mysql_upgrade -p 2. --log-slow-queries is deprecated 130929 11:49:08 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow- query-log-file' instead วิธีแก้ไข edit /etc/my.cnf และเปลี่ยน log-slow-queries="/var/log/mysql_slow_query.log" เป็น slow-query-log-file="/var/log/mysql_slow_query.log" และ restart mysql /etc/rc.d/init.d/mysql restart 3. Error WSREP: Query cache is not supported 130929 23:19:12 [ERROR] WSREP: Query cache is not supported (size=268435456 type=1) วิธีแก้ไข edit /etc/my.cnf และเปลี่ยน query_cache_size=256M เป็น # Query Cache is not supported with wsrep #query_cache_size=256M และ restart mysql /etc/rc.d/init.d/mysql restart
หากไม่มีเมนูจัดการสามารถใช้วิธีการนี้เปลี่ยนได้ วิธีแก้ปัญหาทีม TS ส่งให้ lv2 วิธีแก้ปัญหาทีม SYSNOC หรือ ITS 1. Dump mysql database จาก character เดิมไปเป็น character ใหม่ cd /var/lib/mysql/ # export DATABASE="adminzil_ziltech" # cp -a ${DATABASE} ${DATABASE}40 # mysqldump --default-character-set=tis620 --skip-set-charset ${DATABASE} > ${DATABASE}.sql # ถ้า dump มาแล้ว อ่านไทยไม่ออกลอง # mysqldump --default-character-set=latin1 --skip-set-charset ${DATABASE} > ${DATABASE}.sql # replace tis620 utf8 -- ${DATABASE}.sql # mysql --execute="DROP DATABASE ${DATABASE};" # mysql --execute="CREATE DATABASE ${DATABASE} CHARACTER SET utf8 COLLATE utf8_general_ci;" # mysql --default-character-set=utf8 ${DATABASE} < ${DATABASE}.sql export DATABASE= 2. แก้ไขเว็บไซต์ให้ connect database โดยใช้ character set utf8 โดย search หาจุด ที่มี code mysql_connect หรือ mysql_pconnect และ เพิ่ม code mysql_query("SET character_set_results='utf8'"); สำหรับ ADODB เวลา query ให้ใช้ $sql = "SET character_set_results='utf8'"; $conn->Execute("$sql"); หรือใช้ SET CHARACTER ก็ได้
Innodb ดีกว่า MyISAM เกือบทุกอย่าง ยกเว้น การ import และ export data จะช้าเนื่องจากมีการ lock data ในระดับ row (MyISAM ทำในระดับ table เท่านั้น) Innodb เหมาะกับเว็บใหญ่คนเข้าใช้งานเยอะ ๆ ทำงานได้เร็วกว่า Administration เวลาย้ายระหว่าเครื่อง ไม่สามารถ copy *.ibd files ไปที่เครื่องใหม่ได้เลย. The files contain some ID numbers that would have to be translated. Also, the redo log (ib_logfile*) contain references to the *.ibd files. ต้อง dump database และ import กลับเข้าไปใหม่เท่านั้น วิธีแก้ปัญหาทีม TSส่งให้ lv2 วิธีแก้ปัญหาทีม SYSNOC หรือ ITSRecovery http://forums.mysql.com/read.php?22,34050,52933#msg-52933 if you are not using the [mysqld] option innodb_file_per_table then an InnoDB table consists of the .frm file in the database directory, the table data dictionary entry and data in the ibdata files. If 1. is missing, you can create the table in some other database, and copy the .frm file from there. If 2. is missing, you can simply delete the .frm file manually. After this, you are in a consistent state. --- If you are using innodb_file_per_table then an InnoDB table consists of: the .frm file in the database directory, data dictionary entry in the ibdata files, the .ibd file. If MySQL complains it can't open file x.ibd, that means either 2) or 3) or both are missing. You should look into the .err log of mysqld to determine which is the case. If 1) is missing, do like above. If 2) is missing, then simply delete the .frm file manually (and also the .ibd file if that one exists). If 3) is missing, you should upgrade to a recent 4.1.xx or 5.0.xx version, and simply DROP the table. Earlier versions had the problem that if you did not have the option no-auto-rehash in the [mysql] section of your my.cnf, then dropping a table with a missing .ibd file did not work.
Error Display : psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? วิธีแก้ปัญหาทีม TSส่งให้ lv2 วิธีแก้ปัญหาทีม SYSNOC หรือ ITSCheck version postgresql - root@sih1 [~]# rpm -qa | grep postgres (returns a list like this:) postgresql-8.4.20-6.el6.x86_64 postgresql-libs-8.4.20-6.el6.x86_64 postgresql-devel-8.4.20-6.el6.x86_64 postgresql-server-8.4.20-6.el6.x86_64 Minimally I had to remove these: rpm -e postgresql-8.4.20-6.el6.x86_64 rpm -e postgresql-libs-8.4.20-6.el6.x86_64 rpm -e postgresql-devel-8.4.20-6.el6.x86_64 rpm -e postgresql-server-8.4.20-6.el6.x86_64 การ remove ด้วยวิธีกดังกล่าวอาจจะต้องเรียงตามลำดับ service ที่ใช้งานซึ่งระบบจะแจ้งให้ทราบเองครับ อ้างอิงจาก : http://www.vpshostingforum.com/remove-postgres-t3022.html
สาเหตุ เกิดจาก ข้อมูลใน table มีปัญหา crash ทำให้ไม่สามารถสร้าง {table name}.TMD ได้ซึ่งอาจจะส่งผลให้การทำงานของ Web มีปัญหาเช่นไม่แสดงเนื้อหาใน Topic วิธีตรวจสอบปัญหา ทำการ Repair DB ผ่าน WHM และสังเกตุข้อความที่ Print ออกมาจะปรากฎข้อความ piyaphan_vb40.searchlog error : Can't create new tempfile: './piyaphan_vb40/searchlog.TMD' status : Operation failed วิธีแก้ปัญหาทีม TSไม่สามารถแก้ไขผ่าน WHM ได้ ให้ติดต่อ level2 วิธีแก้ปัญหาทีม SYSNOC หรือ ITSCommand ที่ใช้ในการแก้ไขบน SSH myisamchk -r -f {tablename}.MYI Example root@trading [/home/mysql/piyaphan_vb40]# myisamchk -r -f searchlog.MYI - recovering (with sort) MyISAM-table 'searchlog.MYI' Data records: 1672690 - Fixing index 1 - Fixing index 2 - Fixing index 3 - Fixing index 4