Common Errors When Using MySQL Programs shell>  mysql -u  user_name  -p Enter password: 5291 B.3.2.7 MySQL server has gone away B.3.2.6 Out of memory B.3.2.5 Too many connections On some systems, you may find that your password works when specified in an option file or on the command line, but not when you enter it interactively at the  Enter password:  prompt. This occurs when the library provided by the system to read passwords limits password values to a small number of characters (typically eight). That is a problem with the system library, not with MySQL. To work around it, change your MySQL password to a value that is eight or fewer characters long, or put your password in an option file. If clients encounter  Too many connections  errors when attempting to connect to the  mysqld  server, all available connections are in use by other clients. The permitted number of connections is controlled by the  max_connections  system variable. To support more connections, set  max_connections  to a larger value. mysqld  actually permits  max_connections  + 1 client connections. The extra connection is reserved for use by accounts that have the  CONNECTION_ADMIN  privilege (or the deprecated  SUPER  privilege). By granting the privilege to administrators and not to normal users (who should not need it), an administrator can connect to the server and use  SHOW PROCESSLIST  to diagnose problems even if the maximum number of unprivileged clients are connected. See Section 13.7.7.29, “SHOW PROCESSLIST Statement” . The server also permits administrative connections on a dedicated interface. For more information about how the server handles client connections, see Section 5.1.12.1, “Connection Interfaces” . If you issue a query using the  mysql  client program and receive an error like the following one, it means that  mysql  does not have enough memory to store the entire query result: To remedy the problem, first check whether your query is correct. Is it reasonable that it should return so many rows? If not, correct the query and try again. Otherwise, you can invoke  mysql  with the  --quick option. This causes it to use the  mysql_use_result() C API function to retrieve the result set, which places less of a load on the client (but more on the server). mysql: Out of memory at line 42, ’malloc.c’ mysql: needed 8136 byte (8k), memory in use: 12481367 bytes (12189k) ERROR 2008: MySQL client ran out of memory This section also covers the related  Lost connection to server during query  error. The most common reason for the  MySQL server has gone away  error is that the server timed out and closed the connection. In this case, you normally get one of the following error codes (which one you get is operating system-dependent). Error Code Description CR_SERVER_GONE_ERROR The client couldn’t send a question to the server. CR_SERVER_LOST The client didn’t get an error when writing to the server, but it didn’t get a full answer (or any answer) to the question.