Troubleshoot MySQL Exceptions

Source: Internet
Author: User
Keywords mysql exceptions mysql troubleshoot troubleshoot mysql exceptions
First. A bunch of users whose username is unauthenticateduser are connecting, the error is as follows:
[Warning] IP address'202.105.127.122' could not be resolved: Name or service not known
[Warning] /usr/local/mysql/bin/mysqld: Forcing close of thread 313036 user: '100msh_creater'
Solution: modify in my.cnf, add   under [mysqld] line

skip-name-resolve

skip-external-locking

Second. Error:'proxies_priv' entry'@ root@python1.100msh.com' ignored in--skip-name-resolve mode
Solution: my my.cnf is set to skip_name_resolve,

After I installed mysql using the rpm package, I entered the user table, only one root account was kept, and the host was changed to %, and the rest of the root accounts let me delete them.

But when my mysql.err starts, it prompts

111018 12:43:37 [Warning]'proxies_priv' entry'@root@localhost.localdomain' ignored in --skip-name-resolve mode.

There is no root@localhost.localdomain' account anymore, so why would you prompt this?

 

After the database is installed, the data is restored from the backup. The host name where the backed up database used to be is localhost.localdomain, is it changed now? In this case, delete this record.

If there is a problem, reset the root user, and then flush privileges should be enough

 

Third, mysql memory usage is very small, CPU soars, indicating that there is no index for the table

Solution:

1. Log in to MySQL with the root account and query the current number of database connections. The command is: showprocesslist; a large number of "SELECT partner_no, mac_no, partner_id, sc_pid, mac_addr FROM `t_machine_sc_config` WHERE partner_no='05'" are being executed.

2. By analyzing the SQL query, the index didcSELECT partner_no, mac_no, partner_id, sc_pid, mac_addr FROM`t_machine_sc_config` WHERE partner_no='05';

3. According to the query conditions, establish the partner_no index field

4. After the index is built, switch to the user login mode and observe that the CPU load is normal.

5. The mysql table is stuck, so you need to kill the mysql process, try not to restart, because the mysql table will be damaged when the table is written.

6. Configuration optimization instructions

skip-name-resolve prohibits MySQL from performing DNS resolution on external connections. Use this item to eliminate the time for MySQL to perform DNS resolution.
back--log=384 #back--log parameter value indicates how many requests can be stored on the stack in the short time before mysql temporarily stops responding to new requests. If the system has many connections in a short time, you need to increase the value of this parameter.
key_buffer_size=256M specifies the size of the buffer used for indexing. Increasing it can get better index processing performance.
read_buffer_size=4M buffer size that can be used for read query operations
max_connect_errors =10000 Increase the maximum allowed error connection
wait_timeout =10 specifies the maximum connection time for a request.
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.