SQL Connection failed "Warning: mysqli_connect(): (HY000/2002): Connection refused"

mysqli_connect(‘127.0.0.1’, ‘id10743467_my1php’, ‘absolutely correct password’, ‘id10743467_my1php’);

All data is correct, I enter phpmyadmin without problems. I deleted and re-created the database, changed the password in the settings, every time I get Warning: mysqli_connect (): (HY000/2002): Connection refused
I tried ‘localhost’, it sends Warning : mysqli_connect(): (HY000/1045): ProxySQL Error: Access denied for user ‘id10743467_my1php’@‘2a02:4780:bad:f00d::6’ (using password: YES) in …
I tried ‘localhost:3306’ too
PDO returns a similar result
I tried changing PHP Version too

Please help to solve the problem!

Try localhost instead of IP

Try using PDO also

I tried ‘localhost’, it sends Warning : mysqli_connect(): (HY000/1045): ProxySQL Error: Access denied for user ‘id10743467_my1php’@‘2a02:4780:bad:f00d::6’ (using password: YES) in …
I tried ‘localhost:3306’ too

thank you, I read this article first. I think something goes wrong on the side www.000webhost.com

PDO returns a similar result

1 Like

I tried changing PHP Version too

1 Like

Do you mind if I change the password on your database?

So I’ve changed the password, you can find the new password within https://alex1php.000webhostapp.com/infinity.php

As the message shows the connection is successful which leads me to believe you’ve mistyped your password at some point :slight_smile:

With your new password everything worked, thank you for your help!

1 Like

This topic was automatically closed after 2 hours. New replies are no longer allowed.