Can not connect to my database

Username - epiz_30744064

password - (same as hosting password- i changed it and copied through Accounts- epiz_30744064-show password(MySQL)

I used config.php to connect to my database.
Here is the code /without password/

<?php 
	session_start();
	// spoji se s bazom podataka
	$conn =  mysqli_connect("sql113.epizy.com", "mynewpassword", "", "epiz_30744064_CroatiaZ");

	if (!$conn) {
		die("Error connecting to database: " . mysqli_connect_error());
	}
    // definiraj globalne konstante
	define ('ROOT_PATH', realpath(dirname(__FILE__)));
	define('BASE_URL', 'http://185.27.134.10/db_structure.php?db=epiz_30744064_CroatiaZ/');
	
?>

So, i try connect to epiz_30744064_CroatiaZ database but when I want to open my page it says
Error connecting to database: Access denied for user ‘mynewpassword’@‘192.168.2.192’ (using password: NO)

Any help?
i.e I looked through forums of infinityfree and others on web but still dont get it.
Thank you.

Do you see where it says using password: NO? That should be using password: YES. If you are copying what you see from your website, no one can see your password.

Make sure you have the correct password in your code.

Can you please also share a website URL?

2 Likes

Hi, yes I can see that and dont get it why it says NO instead of YES like in other examples of similar problems people asked. my URL is: http://www.nkcroatiazmijavci.rf.gd/

you need 4 things

database name, username, password and hostname

image

5 Likes

I changed into this code:
$conn = mysqli_connect(“sql113.epizy.com”, “epiz_30744064”, “mynewpassword”, “epiz_30744064_CroatiaZ”);

Now its another error message:
Error connecting to database: Access denied for user ’ epiz_30744064’@‘192.168.2.192’ (using password: YES)

I think i spelled my username correctly :expressionless:

1 Like

look above I put another article :slight_smile:

1 Like

Thank you mate :wink:

1 Like

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