mrlongshen Posted June 29, 2017 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted June 29, 2017 Quote Message: SQLSTATE[HY000] [2002] Connection refused First at all, I install my fluxcp at cpanel. Then mydatabase is at my vps. Then I configure it to connect my vps database at server.php After installation, my web running well after a couple days. Suddenly I visit my web back & I got error above. Why it suddenly happen ? What should I dot ? What is the problem exactly ? Link to comment Share on other sites More sharing options...
0 Akkarin Posted June 29, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Tuesday at 10:17 AM Share Posted June 29, 2017 This could be due to any number of reasons. The most common SQL issue is that your host who's using cPanel have had an update installed and the outbound MySQL port (which is disabled by default) has been removed from the firewall, which happens more often than people realise! However, connection refused is an error message from your MySQL server running on your VPS. Try restarting the service, double check your firewall. No one can give you a definitive answer because the error message is vague. 2 Link to comment Share on other sites More sharing options...
0 mrlongshen Posted June 29, 2017 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Author Share Posted June 29, 2017 @Akkarin I try to remote from my laptop to the database using heidisql and it work perfectly. I have check the mysql services and it running. I check the firewall, and port 3306 is open. Since I can remote it using heidisql. Only my fluxcp at my webhosting are refusing to connect to the database. Link to comment Share on other sites More sharing options...
0 mrlongshen Posted June 30, 2017 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Author Share Posted June 30, 2017 Hello all. Any moderator may proceed to closed this topic. Its has been solved. The problem are from the cpanel mysql port inbound and outbound connection. Need to ask my webhost to open the port and allow it. Thanks to @Akkarinfor give the idea what is the possible problem. +1 for you. 1 Link to comment Share on other sites More sharing options...
Question
mrlongshen
First at all, I install my fluxcp at cpanel. Then mydatabase is at my vps.
Then I configure it to connect my vps database at server.php
After installation, my web running well after a couple days.
Suddenly I visit my web back & I got error above.
Why it suddenly happen ?
What should I dot ?
What is the problem exactly ?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts