If you are using some functionality that is very new in MySQL, you can try to run mysqld with the 如果你正在使用MySQL中一些非常新的功能,你可以尝试使用--skip-new
option (which disables all new, potentially unsafe functionality). --skip-new
选项运行mysqld(该选项禁用所有新的、可能不安全的功能)。See Section B.3.3.3, “What to Do If MySQL Keeps Crashing”.请参阅第B.3.3.3节,“如果MySQL持续崩溃该怎么办”。
If mysqld does not want to start, verify that you have no 如果mysqld不想启动,请验证您没有干扰设置的my.cnf
files that interfere with your setup! my.cnf
文件!You can check your 您可以使用mysqld --print-defaults检查my.cnf
arguments with mysqld --print-defaults and avoid using them by starting with mysqld --no-defaults ....my.cnf
参数,并从mysqld --print-defaults
开始避免使用它们。
If mysqld starts to eat up CPU or memory or if it “hangs,” you can use mysqladmin processlist status to find out if someone is executing a query that takes a long time. 如果mysqld开始消耗CPU或内存,或者它“挂起”,您可以使用mysqladmin processlist status来查看是否有人正在执行需要很长时间的查询。It may be a good idea to run mysqladmin -i10 processlist status in some window if you are experiencing performance problems or problems when new clients cannot connect.如果您遇到性能问题或新客户端无法连接时出现问题,在某些窗口中运行mysqladmin -i10 processlist status
可能是个好主意。
The command mysqladmin debug dumps some information about locks in use, used memory and query usage to the MySQL log file. mysqladmin debug
命令将有关正在使用的锁、已用内存和查询使用情况的一些信息转储到MySQL日志文件中。This may help solve some problems. This command also provides some useful information even if you have not compiled MySQL for debugging!这可能有助于解决一些问题。即使您没有编译MySQL进行调试,此命令也提供了一些有用的信息!
If the problem is that some tables are getting slower and slower you should try to optimize the table with 如果问题是某些表变得越来越慢,您应该尝试使用OPTIMIZE TABLE
or myisamchk. OPTIMIZE TABLE
或myisamchk优化表。See Chapter 5, MySQL Server Administration. You should also check the slow queries with 请参阅第5章,“MySQL服务器管理”。您还应该使用EXPLAIN检查慢速查询。EXPLAIN
.
You should also read the OS-specific section in this manual for problems that may be unique to your environment. See Section 2.1, “General Installation Guidance”.您还应该阅读本手册中特定于操作系统的部分,了解您的环境可能特有的问题。请参阅第2.1节,“一般安装指南”。