github地址

OperationalError: (2006, ‘MySQL server has gone away’)错误，但正式服务器就不会，在网上找了很久还是没找到解决的办法。

If you hit this problem and don’t want to understand what’s going on, don’t reopen this ticket, just do this:

• RECOMMENDED SOLUTION: close the connection with from django.db import connection; connection.close() when you know that your program is going to be idle for a long time.
• CRAPPY SOLUTION: increase wait_timeout so it’s longer than the maximum idle time of your program.

In this context, idle time is the time between two successive database queries.

docker pull wordpress拉取最新版本的Wordpress后，执行命令后台启动Wordpress

MySQL提供了count命令来统计表中的记录数, 使用起来非常方便。但加上where条件的count命令有时会很慢，此时需要优化。