Failed to connect to MySQL: Mysqli_connect(): (HY000/2002): Permission denied

We are experiencing issues with one of our MySQL server. Some of our customers may experience the following errors when connecting to the database.

We believe the problem will be fixed within 24 hours. Please be patient.

@teodor


Warning: mysqli_connect(): (HY000/2002): Permission denied in /storage/ssd2/659/6067659/public_html/getCourse.php on line 4

Failed to connect to MySQL: Permission denied

Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /storage/ssd2/659/6067659/public_html/getCourse.php on line 16

Warning: mysqli_close() expects parameter 1 to be mysqli, boolean given in /storage/ssd2/659/6067659/public_html/getCourse.php on line 36

I’m getting this error lately, my database connection was working before and Idk why it’s not now

can we have a look on your connection file getCourse.php ? its look like you have enter wrong db details.

https://status.000webhost.com/
Freaking 000webhost DB is down for 5h, could that be a result for this?

My website is also down today for some DB error.

Woah, thank you for the notification, I have forwarded that to the related devops :slight_smile:

Can anyone help me? I really need this to be fix ASAP because my project is on this webhosting service

<?php $conn = mysqli_connect("localhost", "", "", ""); ?>

P.S. I just left the 3 blank fields for security purposes.

1 Like

Are you sure you entered the correct details?

Yes it was working before I got this error. I’ve been using this service for about a week now without any errors from DB

1 Like

Alright, the devops have already been notified.
Please allow 24 hours for the issue to be fixed.

Ok. You can try checking my connect.php link

https://itproj2captcha.000webhostapp.com/itproj2captcha/connect.php

It seems a global issue for other users too, let’s wait and see :slight_smile:

1 Like

If credentials were incorrect you were receiving:

No connection could be made because machine refused it
Access denied for user xx@xxxx using password: no/yes


Permission denied is not related to credentials.

1 Like