Access denied for user 'root'


#1

Warning: mysql_real_escape_string(): ProxySQL Error: Access denied for user ‘root’@‘2a02:4780:bad:f00d::b’ (using password: NO) in /storage/ssd2/021/7008021/public_html/include/server.php on line 43

it seems like only my login and register couldn’t connect to the database but my other page are working fine because they’re able to call image from the database with no problem.


#2

What site does this relate to?

See your config file for putting in the correct values from Manage Database 000webhost.com

root is not the username id123456_user etc will be the user.
host is localhost
password will be whatever you set when you made the database again via Manage Database on 000webhost.com


#3

$db = mysqli_connect(“localhost”, “id7008021_leejunsheng”, “******”, “id7008021_drawingguide”);

i did connect using the id and database. and i put inside “database.php” and include it. But it still couldn’t access to my database


#4

Weird it shouldn’t bring up the info it has brought up if you’ve done that correctly.
What file are we looking at specifically?
Link to webserver would be good


#5

See PDO, most recommended as the code you are using leaves you at risk of malicious users injections.


#6

server.php, and how can i link to webserver?


#7

Website’s address is what he meant, I think


#8

I had a look on the “drawingguides” site > include > server.php and it seems alright, it references database.php and that seems alright as well?

<?php

     $db = mysqli_connect("localhost", "id7008021_xxxxx", "xxxxx", "id7008021_xxxxxx");
     
?>

So can’t see where the root value is coming from.

What pages loads the error?