Common Errors When Using MySQL Programs This sets the number of ephemeral ports available to any user. The valid range is between 5000 and 65534 (decimal). The default value is 0x1388 (5000 decimal). This sets the number of seconds to hold a TCP port connection in  TIME_WAIT  state before closing. The valid range is between 30 and 300 decimal, although you may wish to check with Microsoft for the latest permitted values. The default value is 0x78 (120 decimal). 2. Locate the following key in the registry: 3. On the  Edit  menu, click  Add Value , and then add the following registry value: 4. On the  Edit  menu, click  Add Value , and then add the following registry value: 5. Quit Registry Editor. 6. Reboot the machine. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters Value Name: MaxUserPort Data Type: REG_DWORD Value: 65534 Value Name: TcpTimedWaitDelay Data Type: REG_DWORD Value: 30 5290 MySQL client programs prompt for a password when invoked with a  --password  or  -p  option that has no following password value: If the cause is none of those just described, you may be experiencing a problem with  BLOB  values that are larger than  max_allowed_packet , which can cause this error with some clients. Sometime you may see an  ER_NET_PACKET_TOO_LARGE  error, and that confirms that you need to increase max_allowed_packet . More rarely, it can happen when the client is attempting the initial connection to the server. In this case, if your  connect_timeout  value is set to only a few seconds, you may be able to resolve the problem by increasing it to ten seconds, perhaps more if you have a very long distance or slow connection. You can determine whether you are experiencing this more uncommon cause by using  SHOW GLOBAL STATUS LIKE ’Aborted_connects’ . It increases by one for each initial connection attempt that the server aborts. You may see “reading authorization packet”  as part of the error message; if so, that also suggests that this is the solution that you need. Sometimes the “during query”  form happens when millions of rows are being sent as part of one or more queries. If you know that this is happening, you should try increasing  net_read_timeout  from its default of 30 seconds to 60 seconds or longer, sufficient for the data transfer to complete. Usually it indicates network connectivity trouble and you should check the condition of your network if this error occurs frequently. If the error message includes “during query,”  this is probably the case you are experiencing. There are three likely causes for this error message. Note: Undoing the above should be as simple as deleting the registry entries you’ve created. B.3.2.3 Lost connection to MySQL server B.3.2.4 Password Fails When Entered Interactively