Appendix A. Problems and Common Errors

MySQL 5.0

Appendix A. Problems and Common Errors

Table of Contents

A.1. How to Determine What Is Causing a Problem
A.2. Common Errors When Using MySQL Programs
A.2.1.
A.2.2.
A.2.3.
A.2.4. Password Fails When Entered Interactively
A.2.5. ' is blocked
A.2.6.
A.2.7.
A.2.8.
A.2.9.
A.2.10. Communication Errors and Aborted Connections
A.2.11.
A.2.12.
A.2.13.
A.2.14.
A.2.15. ' doesn't exist
A.2.16.
A.2.17. File Not Found
A.3. Installation-Related Issues
A.3.1. Problems Linking to the MySQL Client Library
A.3.2. Problems with File Permissions
A.4. Administration-Related Issues
A.4.1. How to Reset the Root Password
A.4.2. What to Do If MySQL Keeps Crashing
A.4.3. How MySQL Handles a Full Disk
A.4.4. Where MySQL Stores Temporary Files
A.4.5. How to Protect or Change the MySQL Unix Socket File
A.4.6. Time Zone Problems
A.5. Query-Related Issues
A.5.1. Case Sensitivity in Searches
A.5.2. Problems Using Columns
A.5.3. Problems with Values
A.5.4. Problems with Column Aliases
A.5.5. Rollback Failure for Non-Transactional Tables
A.5.6. Deleting Rows from Related Tables
A.5.7. Solving Problems with No Matching Rows
A.5.8. Problems with Floating-Point Comparisons
A.6. Optimizer-Related Issues
A.7. Table Definition-Related Issues
A.7.1. Problems with
A.7.2. How to Change the Order of Columns in a Table
A.7.3. Problems
A.8. Known Issues in MySQL
A.8.1. Open Issues in MySQL

This appendix lists some common problems and error messages that you may encounter. It describes how to determine the causes of the problems and what to do to solve them.

A.1. How to Determine What Is Causing a Problem

When you run into a problem, the first thing you should do is to find out which program or piece of equipment is causing it:

  • If you have one of the following symptoms, then it is probably a hardware problems (such as memory, motherboard, CPU, or hard disk) or kernel problem:

    • The keyboard doesn't work. This can normally be checked by pressing the Caps Lock key. If the Caps Lock light doesn't change, you have to replace your keyboard. (Before doing this, you should try to restart your computer and check all cables to the keyboard.)

    • The mouse pointer doesn't move.

    • The machine doesn't answer to a remote machine's pings.

    • Other programs that are not related to MySQL don't behave correctly.

    • Your system restarted unexpectedly. (A faulty user-level program should never be able to take down your system.)

    In this case, you should start by checking all your cables and run some diagnostic tool to check your hardware! You should also check whether there are any patches, updates, or service packs for your operating system that could likely solve your problem. Check also that all your libraries (such as ) are up to date.

    It's always good to use a machine with ECC memory to discover memory problems early.

  • If your keyboard is locked up, you may be able to recover by logging in to your machine from another machine and executing .

  • Please examine your system log file ( or similar) for reasons for your problem. If you think the problem is in MySQL, you should also examine MySQL's log files. See Section 5.12, “MySQL Server Logs”.

  • If you don't think you have hardware problems, you should try to find out which program is causing problems. Try using top, ps, Task Manager, or some similar program, to check which program is taking all CPU or is locking the machine.

  • Use top, df, or a similar program to check whether you are out of memory, disk space, file descriptors, or some other critical resource.

  • If the problem is some runaway process, you can always try to kill it. If it doesn't want to die, there is probably a bug in the operating system.

If after you have examined all other possibilities and you have concluded that the MySQL server or a MySQL client is causing the problem, it's time to create a bug report for our mailing list or our support team. In the bug report, try to give a very detailed description of how the system is behaving and what you think is happening. You should also state why you think that MySQL is causing the problem. Take into consideration all the situations in this chapter. State any problems exactly how they appear when you examine your system. Use the “copy and paste” method for any output and error messages from programs and log files.

Try to describe in detail which program is not working and all symptoms you see. We have in the past received many bug reports that state only “the system doesn't work.” This doesn't provide us with any information about what could be the problem.

If a program fails, it's always useful to know the following information:

  • Has the program in question made a segmentation fault (did it dump core)?

  • Is the program taking up all available CPU time? Check with top. Let the program run for a while, it may simply be evaluating something computationally intensive.

  • If the mysqld server is causing problems, can you get any response from it with mysqladmin -u root ping or mysqladmin -u root processlist?

  • What does a client program say when you try to connect to the MySQL server? (Try with mysql, for example.) Does the client jam? Do you get any output from the program?

When sending a bug report, you should follow the outline described in Section 1.8, “How to Report Bugs or Problems”.