Error "Lost connection to MySQL server at 'reading initial communication packet'" Connecting to MySQL

Published: 20 Jun 2014
Last Modified Date: 15 May 2019


When connecting to MySQL, the following error might occur:

[MySQL][ODBC 5.3(w) Driver]Lost connection to MySQL server at 'reading initial communication packet', system error: 0


  • Tableau Desktop
  • MySQL


Work with your database administrator to ensure that both MySQL and the computer is configured correctly. For example, on MySQL Server, check your /etc/hosts.deny to make sure that it is not set to:
mysqld: ALL: DENY

As those settings will cause MySQL to immediately deny connections.

If the following is added to the MySQL Server /etc/hosts.allow, it may also fix the issue: mysqld: ALL  Following this logic, your MySQL admin may allow just clients coming from some network, for example: mysqld:

When connecting to MySQL Server, MySQL treats localhost specially. Specifically, localhost means to use the UNIX socket, whereas means to use TCP/IP networking since these two are not interchangeable, despite being able to connect using IP address or host name.


This error message typically indicates an issue with the Hosts configuration of MySQL and is not related to Tableau Desktop.

Additional Information

Although we make every effort to ensure links to external websites are accurate, up to date, and relevant, Tableau cannot take responsibility for the accuracy or freshness of pages maintained by external providers. Contact the external site for answers to questions regarding its content.
For additional information about this issue, see the following documentation in the Stackoverflow and Drupal forums:
Did this article resolve the issue?