I have a script set up on a site which is a static shoutbox page for people to leave comments etc.
Everthing /was/ working fine. I have set up my constants in my shoutbox.php file as such;
define("HOST", "localhost");
define("USER", "shout1");
define("PASSWORD", "xxxxxxxx");
define("DB", "shout1");
My database is called shout1 and the user name assigned to it is the same. I have created a table on that database called shoutbox which has 4 entries of id (INT), date, user (VARCHAR) & message (VARCHAR) which I believe is fine.
When I go to the domain in question http://p4blo.it/shoutbox I get the error mentioned in the title advising that access is denied @localhost for shout1
Any ideas? I have double and triple checked, deleted DB and tables, recreated etc.
EDIT: Forgot to mention, user shout1 has been assigned access with FULL privileges to database shout1
Looks like your host runs with cPanel. In cPanel you have to be carefull with your user and database names, since they are prefixed with your cPanel-username. Eg. if your cPanel-username is “p4blo” then the database is called “p4blo_shout1” and the username “p4blo_shout1”.