MySQL FAQs _ MySQL

Source: Internet
Author: User
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

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.