Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Xây dựng Website, Blog bằng WordPress (http://quantrinet.com/forum/forumdisplay.php?f=438)
-   -   Fix lỗi "SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes';" (http://quantrinet.com/forum/showthread.php?t=10144)

hoctinhoc 14-09-2017 07:22 PM

Fix lỗi "SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes';"
 
Fix lỗi database wordpress chạy chiếm nhiều CPU


Fix lỗi "SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes';"

Khi bạn thấy mysqld chạy chiếm nhiều CPU bất thường thì bạn kiểm tra bằng cách sau

Vào mysql

# mysql -uroot -p

Gõ lệnh xem process

show processlist;

Nếu thấy có nhiều process dạng:

"SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes';"

Thì do database bị lỗi không Index cho table wp_options, bạn tạo lại index bằng cách sau:

================
use tendatabase;
SELECT COUNT(*), autoload FROM wp_options GROUP BY autoload;
ALTER TABLE wp_options ADD INDEX (`autoload`);
================

Tham khảo: https://www.saotn.org/wordpress-wp-o...-optimization/

Chúc bạn thành công.


Bây giờ là 04:05 PM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.