16

My website is working perfectly on a localhost 'Wamp' server. However, as soon as I upload it to my web host for others to use, I get the following error:

Host 'stats.starfish.arvixe.com' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

I cannot perform a 'flush-hosts' command, since I am using a shared host and lack the privileges.

I've searched extensively online, and I can't find a solid answer as to what may be causing my connection errors. The site works for a bit, but as soon as multiple people start using it, MySQL blocks my web host because it has too many connection errors.

Is there any sort of log I can access or view that may inform me as to what is causing the connection error?

000
  • 26,951
  • 10
  • 71
  • 101
Matthew
  • 158
  • 1
  • 1
  • 5
  • 3
    Hmmm.... I have ever found this issue. It seems that many person use MySQL server at the same time and that makes the error show up. Please kindly contact your hosting provider to check it for you. –  Apr 26 '13 at 04:38
  • Are you using persistent connections? I've seen this sort of problem caused by enabling persistent connections before. – jbrahy Aug 04 '15 at 15:22

3 Answers3

3

https://dev.mysql.com/doc/refman/5.0/en/blocked-host.html

Your problem is that you are continually attempting to connect and you are failing. The shared server is set to protect itself from this behavior, and has cut you off. Turn off your application for a while and then resolve the connection problem before turning it back on.

The amount of time before you are able to attempt again is set on the server, likely in a place you can not see. So try every 15 minutes for a while until you are allowed the attempt ...

I would suggest a spare mysql server (perhaps locally) to practice with so you can avoid what appears to this host as a brute force attack in the future. Always test your connection manually before "turning on the service".

TheSatinKnight
  • 696
  • 7
  • 16
0

I had the same problem. But I solved it like this:

  1. Login to your "Domain Admin Panel" (www.yourdomainname.com/cpanel)

  2. Go to "Databases" section and click on "Remote Mysql" option

    enter image description here

  3. In the next page, in "Host (% wildcard is allowed)" text field put "%" and press "Add Host" button

    enter image description here

  4. Now you should see that "%" in the below list and from there you can delete it by pressing "X" button any time.

  5. Now go to your "php Script" file and set your Database Host Name, Without "http://" or "www"

    enter image description here

Now try to reconnect it. Hope it will help you.

Remember:
By doing this, You are allowing external web servers to access your MySQL databases by adding their domain name to the list of hosts that are able to access databases on your web site.

Community
  • 1
  • 1
Tulon
  • 4,011
  • 6
  • 36
  • 56
0

Use "localhost" as db host, if your website is hosted at the same server of the db

Humba
  • 128
  • 1
  • 10
  • 1
    This is highly unlikely to be the issue, especially if a MySQL server is responding at `stats.starfish.arvixe.com` as shown in the question. – ceejayoz Aug 27 '15 at 18:53