Before I get into the question, I ran into a lot of questions, both on this website, as well as a bunch of others, however none of the solutions there helped, and so decided to post a question with my exact situation.
So I am currently building a website, and am trying to connect it to a MySQL database I have created on phpmyadmin through hostgator. I am currently using 000webhost.com to host my webpages, as the computer I am working on does not have an ftp client, and am unable to install it as of now. As such, I decided to upload the files onto there temporarily as I build it, as they are dynamic webpages. Whenever I load up the page, however, I receive this error:
Warning: mysqli_connect(): (HY000/1045): ProxySQL Error: Access denied for user...
where the "..." just lists my username and filepath to the file.
this is my php code to connect to the database:
<?php
define("DB_SERVER","localhost");
define("DB_USERNAME","**user**");
define("DB_PASSWORD","**password**");
define("DB_DATABASE","**database_name**");
if(!mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD)){
echo"Failure";
}
else{
echo"Success!";
}
?>
I double- and triple-checked the database username, password and name, however to no avail. Thanks a lot in advanced!