"Connection timed out" Error when I try to connec o mysql db

I get this error when i try to connect to database

code:

$conn = mysqli_connect(
    'http://.....epizy.com', (url)
    'epiz_34.....', (user)
    '.......', (password)
    'epiz_3..._v...'  (db name)
);

ty

What error?
If you need help, provide more info.
Otherwise your post will be ignored

3 Likes

Uh “Connection timed out”.

(It’s on the title lmao)

why did you add http:// in the mysql Hostname?
remove it

make it sqlXXX.epizy.com

3 Likes

I deleted the “http://”, still not working

What is your site URL? What are you trying to do?
Can you post your current code by censoring only sensitive details such as your password? Leave the URL intact.

This topic could perhaps assist you:

2 Likes

Please make sure to actually enter your MySQL Hostname in the first argument of the mysqli_connect function, as displayed in both the client area and control panel. It looks like sqlXXX.epizy.com, where XXX are three numbers. If your current setting looks different, it’s not correct. It is not the same as your website URL.

2 Likes

Sure, here’s the code.

$conn = mysqli_connect(
    'hsql304.epizy.com',
    'epiz_3405958',
    'password', 
    'epiz_34059586_videos',
);

Yoooooo
I’m an idiot, i wrote hsql304.epizy.com instead sql304.epizy.com

I corrected it, I’ll wait to tomorrow if the website’s database works (becouse is still not working)

2 Likes

You have also missed a “6” in the username part (you’ve written epiz_3405958 instead of epiz_34059586, if it’s still not working, it’s likely because of that.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.