SQL Error: can't connect to MySQL server on 'localhost'

Marlonnnz's profile image Marlonnnz posted 1 year ago in General Permalink

This is my first post here so please bear with me.

I have a database on a remote server and a copy of that database on my local machine that I use for testing on my website. The local copy has become outdated so I attempted to update it with the SQL Export tool. Attached is the screenshot of the settings I had before hitting export. After hitting export I could no longer access the local database. The error I get when I try to run my application is ERR_CONNECTION_REFUSED and localhost refused to connect.

I am using visual studio to try and connect but I had made no changes on that side, the error only happened when I used the SQL export tool. Could I have get some guidance on this issue?

1 attachment(s):
  • Screenshot-2023-02-15-at-1.03.34-PM
ansgar's profile image ansgar posted 1 year ago Permalink

There is no checkbox checked on the left side, and the Export button is disabled. Even if you check the whole "LocalAHCloud" session checkbox, the settings on the right side told HeidiSQL to just write to a file. I don't see why such a file export should break your application's connection.

gulshan212's profile image gulshan212 posted 12 months ago Permalink

Hello this is Gulshan Negi Well, it can be caused by various factors such as the MySQL server not running, incorrect port or hostname, incorrect credentials, firewall settings, or misconfigured MySQL server configuration. By checking the MySQL server status, port, hostname, credentials, firewall settings, and server configuration, you can troubleshoot and resolve the issue. If needed, seek assistance from a qualified database administrator or developer for further help. I hope it will help you. Thanks

Please login to leave a reply, or register at first.