Skip to content
Advertisement

How to fix Error while reading greeting packet?

I am trying to connect to server in NetBeans. I write the code as below:

JavaScript

Running of this code return this erreurs:

JavaScript

Advertisement

Answer

MySQL can be configured to not accept external connections, for security reasons. By saying the full domain name, you are using the public IP and therefore you are an external connection. If MySQL is running on the same box as your webserver, just access it via this domain name:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement