I am hosting a site on some free hosing website called 'freewebhostingarea.com' and for this particular project when I had it running locally on my Apache it worked quite fine but when I uploaded it to the server I can't access the same database which is being hosted on my computer at home. So initially I was running the site under WAMPP using phpmyadmin as the DBMS but when I moved the site I imported the .sql file from phpmyadmin into Workbench and provided external access to root account and to test this I can remotely connect to this database over the Internet from another computer. But the site itself if giving this error:
Access denied for user 'apache'@'localhost' (using password: NO)
But the script to access the database has this code:
<?php
mysqli_connect('url','username','password');
echo mysql_error();
mysql_select_db('database');
echo mysql_error();
?>
I am failing to understand why it is even using 'apache' as username when I have specified the username to use?