MySQL FAQ's summary

Source: Internet
Author: User
Tags time limit


MySQL always crashes

First you should try to find out whether the 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 performing properly, and if Mysqld is dead, you can find its cause in the file "mysql-data-directory/' hostname '. Err".

Some common errors when using MySQL

The common cause of MySQL server has gone away is that the server timed out and closed the connection. By default, if nothing happens, the server closes the connection after 8 hours. You can change the time limit by setting the Wait_timeout variable when you start Mysqld.

If the mysqld gets a packet that is too large or unhealthy, it thinks the customer is wrong and closes the connection.

Can ' t connect to [local] MySQL server

Usually means that no MySQL server is running on the system or when trying to connect to the MYSQLD server, you are using an incorrect socket file or TCP/IP port.

Check (using PS) if there is a process on the server named MySQL database D started

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--so Cket=/tmp/mysql.sock version Note the hostname command uses the inverse quotation mark "'" instead of the positive quotation mark "'", which causes the hostname output (that is, the current hostname) to be substituted into the mysqladmin command.

Host ' ... ' is blocked error

Host ' hostname ' is blocked because of many connection errors. Unblock with ' mysqladmin flush-hosts ' This means that mysqld has got a large number (max_connect_errors) of hosts ' hostname ' in the middle of a connection request that was interrupted. After max_connect_errors a failed request, MYSQLD identified an error (like a hacker attack) and blocked further connections to the site until someone executed the command mysqladmin flush-hosts.

by default, mysqld blocks a host after 10 connection errors. You can easily tune by starting the server like this!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.