The table lookup problem is resulting from the problem that your user is not allowed to connect to the MySQL database.
Did you grant the correct privileges to that user? Did you run
afterwards? This is important because the changes become valid only after that command.