access denied for user @ 'localhost' to database ''
You are most likely not using the correct credentials for the MySQL server. You also need to ensure the user you are connecting as has the correct privileges to view databases/tables, and that you can connect from your current location in network topographic terms (localhost).
Try this: Adding users to MySQL
You need grant privileges to the user if you want external acess to database(ie. web pages).