Cant connect remotely centos on mysql 5.7 - mysql

I've tested everything, and every possible way.
I already disabled iptables, I did everything myself.
I gave joker permissions on all users and database in mysql.
And anyway, how can test https://cp.nationwarriors.com/ the error persists:
Fatal error connecting to mysql server.
SQLSTATE [HY000] [2003] Can not connect to MySQL server on '177.87.231.218' (111)
in localhost I get it.
I checked the door is normally open at https://www.yougetsignal.com/tools/open-ports/

After a Teamviewer session and a few tests we've discovered that the problem is with the hosters firewall.
You can telnet from every location to the database server, except from the webserver.

Related

'connection to localhost failed' when 'waking up the server (mysql server on aws lightsail)

I a have a windows server on AWS (Lightsail). I have installed MYSQL Server on it. I have multiple websites that connect to the MYSQL server via Localhost. When I use one of the websites after a long period of inactive time and it has to connect to the MYSQL server, I receive the error:
'connection to localhost failed'
What's strange is that it happens only the first time. If I try to connect after that there's no problem. It's like the MYSQL enters in sleep mode, and the first connection wake's it up, and then there is no problem.
I have no idea how I could troubleshoot that.
Any ideas?

JetBrains can not connect with a Hosted MySQL Database

I have a MySQL-Database from a hostingservice (strato.de). I try to connect the JetBrains DataGrip with this MySQL Database. I tried to connect but I get everytime a timeout. So I tried it with SSH but there I got this error:
[08001] Could not create connection to database server. Attempted
reconnect 3 times. Giving up. java.io.EOFException: Can not read
response from server. Expected to read 4 bytes, read 0 bytes before
connection was unexpectedly lost.
I do not understand the problem... is the Firewall blocking the connection?
How can I connect JetBrains with my Hosted MySQL-Database?
Make sure your hosting provider exposed MySQL database port for external connections.
Have you tried to connect via MySQL Workbench?
Just in case read JetBrains help topic

Can't connect to MySQL server (hosted by strato) error: 2013 lost connection to mysql server at 'reading initial communication packet' system error 0

Hi I am trying to connect to my MySQL DB which is hosted by strato. On their site I can create a DB and I did. I am able to connect via PuTTy like shown in this link. And I found the port, hostname etc as you can see but now I am trying to connect to the database via NaviCat but I keep getting the following error: 2013 lost connection to mysql server at 'reading initial communication packet' system error 0.
I configured NaviCat like this (as password I filled in the masterpassword strato provided me)
and this (as password I filled in the masterpassword strato provided me)
Screenshot of the error I am getting:
There is also a page on my hosters site with an tutorial on how to connect to their DB using PuTTy: link to page
Maybe you're wondering why I don't contect the host, it takes ages for them to reply...
What am I doing wrong why cant I connect how can I fix it?
If anyone can help me i would rlly appreciate it!
The manual says the hostname for a database connection should be
rdbms.strato.de
Or has this never been possible? I quote Can not connect to mysql database [strato]:
Connection posibilities(access) depends on your hosting package. But,
actually, remote connections to strato mySQL is not allowed(security
reasons). I have the same trouble with PowerWeb Basic.
The access is probably meant for applications you host with them, not running elsewhere (eg. at home).
If you want to work locally, perhaps they allow you to take a dump of your database that you can install locally? Do they have PHPMyAdmin?

"Host is not allowed to connect to this MySQL server" over network

I am attempting to connect Tableau on a client (Windows 7) to a MySQL Server 5.6 (on Windows Server 2012 R2) that is hosting my data warehouse. This server is hosted on my university's network. Here is what I have done so far:
created a user that has privileges it needs (I ran GRANT ALL PRIVILEGES ON the user with FLUSH PRIVILEDGES, based on some other stack overflow posts)
made sure the host specified in the user table is "%"
made sure there was nothing in the my.cnf file that would prevent external connections (again based on another stackoverflow post)
ensured that the edition of MySQL running on the server is 64 bit, like the version of Tableau I'm running
I still get the "[MySQL][ODBC 5.3(w) Driver]Host 'vpn240-74.vpn.utah.edu' is not allowed to connect to this MySQL server" error. This same error is thrown when I try to telnet to the port on the server MySQL is listening on.
I have found that this error persists whether I am connected via a vpn or on campus. I can RDP to the server in question, ping it, and found the firewall rule for the port I am using, so I don't think there is anything network related that is stopping me.
All my stackoverflow research says that error means MySQL is convinced that the user is not allowed to connect from that specific hostname, but I get the same error whether I change the entry in the user table to be "%" or the specific hostname from the error message.
Also I see that the Tableau MySQL driver I installed is a lower version number than the MySQL instance I'm trying to hit (5.3 vs 5.6) but that is the newest driver on the Tableau site that I can find.
Any help greatly appreciated.
Have you tried making an ODBC connection in your computer to your MySQL server and testing it that way?
Tableau can then connect via an ODBC connection made rather than the explicit Tableau MySQL driver. In Tableau under More Servers... Other Databases (ODBC) shows up at the very bottom.

How to fix 'Can not connect to MySQL server' error?

First of all I apologize for my English is not perfect.
I'm trying to connect to mysql database remotely.
I have already done the basic steps such as, for example, comment the bind address in my.cnf.
I gave permissions to the appropriate users in MySQL.
I tried with my friend to do it connect to the database, and it worked but we were in the same room with the same router.
Now I'm home and I tried to connect my friend, but I always get error:
ERROR 2003 (HY000): Can not connect to MySQL server ....
Maybe it's a problem of my home router? I can not even do the telnet.
P.S. I've also taken steps to set the firewall.
Some reasons for that,
mysqld is not running on the local host. Check your operating
system's process list to ensure the mysqld process is present.
You're running a MySQL server on Windows with many TCP/IP connections
to it. If you're experiencing that quite often your clients get that
error, you can find a workaround here: Section B.5.2.2.1, “Connection
to MySQL Server Failing on Windows”.
Check whether the server is running on that host by executing telnet
some_host 3306 and pressing the Enter key a couple of times. (3306 is
the default MySQL port number. Change the value if your server is
listening to a different port.) If there is a MySQL server running
and listening to the port, you should get a response that includes
the server's version number. If you get an error such as telnet:
Unable to connect to remote host: Connection refused, then there is
no server running on the given port.
Look at this mySQL full documentation, it will be helpful.