What is the database host name?

I face database Host name error and can’t connect to my sql database on 000webhost i use this but can’t working
https://databases.000webhost.com/

Database host name is localhost if you are using the new panel old panel is whatever server you are on.

Tried to connect database with host name localhost , not being able to connect, so what is IP address of my host and how I could connect to this

What is your site?
:slight_smile:

I have the same problem. I am using the new panel. Please check my coding below. Is it correct?

<?php
    $dbhost = 'localhost';
    $dbuser = 'admin';
    $dbpass = 'abc123';
    $conn = mysqli_connect($dbhost, $dbuser, $dbpass) or die ('Database connection problem.');
?>

Thank you.

Hi Admin,
Seems like I can not able to get connected with database server.
I want to know server name (mysql).
I tried databases.000webhost.com but connection failed error.

My website is vishalkumar.000webhostapp.com and tried with this code

 $db_host = "localhost"; //hostname
    $db_user = "xyz"; // username
    $db_password = "xyz"; // password
    $db_name = "xyzl"; //database name 

So need to being able to connect with this host name localhost

Hi James,
My website is vishalkumar.000webhostapp.com and tried with this code

 $db_host = "localhost"; //hostname
    $db_user = "xyz"; // username
    $db_password = "xyz"; // password
    $db_name = "xyzl"; //database name 

So need to being able to connect with this host name localhost, its givin[quote=“James, post:4, topic:40460, full:true”]
What is your site?
:slight_smile:
[/quote]

g 500 server error
[/quote]

Thanks, servername= “localhost” is working for the new panel.
Visit here. Just have fun digital marketing.

1 Like