Check your permissions table. It sounds like what account you are using doesn't have localhost permissions; the mysql documentation should help you do this, if you don't know already.