MySQL FAQs
MySQL always crashes
First, you should try to find out whether the problem MySQLd daemon is dead or whether your problem is related to your customer. You can use MySQLadmin version to check how long your MySQLd server has been running normally. if MySQLd is dead, you can go to the file "MySQL-data-directory/'hostname '. find the cause in err.
Some common errors when using MySQL
The common cause of MySQL server has gone away is that the server times out and closes the connection. By default, if nothing happens, the server closes the connection eight hours later. You can change the time limit by setting the wait_timeout variable when starting MySQLd.
If MySQLd gets a large or abnormal package, it considers the customer has an error and closes the connection.
Can't connect to [local] MySQL server
It usually means that no MySQL server is running on the system or you are using an incorrect socket file or TCP/IP port when trying to connect to the MySQLd server.
Check (using ps) whether a process named MySQL database d is started on the server
If a MySQLd process is running, you can check the server by trying these different connections.
Shell> MySQLadmin version shell> MySQLadmin variables shell> MySQLadmin-h 'hostname' version variables shell> MySQLadmin-h 'hostname' -- port = 3306 version shell> MySQLadmin-H' ip for your host 'version shell> MySQLadmin -- socket =/tmp/MySQL. sock version note that the hostname command uses the reverse quotation mark (') instead of the forward quotation mark ('). These causes the hostname output (that is, the current host name) to be replaced by the MySQLadmin command.
Host '...' is blocked error
Host 'hostname' is blocked because of specified connection errors. unblock with 'mysqladmin flush-hosts', which means that MySQLd has obtained a large number of connection requests that are interrupted in the middle of the host 'hostname' (max_connect_errors. After max_connect_errors failed requests, MySQLd identified an error (like a hacker attack) and blocked the site from further connection until someone executed the command MySQLadmin flush-hosts.
By default, MySQLd blocks a host after 10 connection errors. You can easily call