Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Every time I try to connect to a MySQL database on remote Linux server, I get the Lost connection to MySQL server during query error. Whats wrong?

0
Posted

Every time I try to connect to a MySQL database on remote Linux server, I get the Lost connection to MySQL server during query error. Whats wrong?

0

There are two most common reasons of this problem. – If you use SSH tunnel to connect to your database, then most likely you indicated wrong MySQL host. Upon establishing a connection with the SSH server the connection attempt to MySQL server initiated by SSH server fails. Please check the MySQL host name. Remember that it should be specified relative to SSH host and if these are installed on the same workstation then you should use “localhost” as MySQL host name. – This error can occur if your Linux glibc requires greater than 128K of stack size to resolve a hostname. It happens primarily on RedHat 8.0 system with MySQL version lower than 4.0.10, but also can happen with another configuration. To solve such issue, add/edit the following line to the [mysqld] section of MySQL configuration file: set-variable = thread_stack=192k # value must be 192K or higher.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123