[mysql] Connecting problems

I am trying to store some data in an mysql database. Something goes wrong when I try to connect to the database.
When I try to connect from the command line from the same machine, with the same login/pass/hostname I can login without a problem. When I try it through Asterisk connecting will fail.

Asterisk (1.4.11) and the Asterisk-addons (1.4.2) are installed at the same time.
I am running an mysql-server version 5.0.22. I tried both the old and the new password system from mysql.

Does anyone know what’s going wrong? Did I miss something when installing or maybe somewhere else!

What is host= set to ? Is it, Localhost, machine name or machine IP ? Try changing around what host= and that may fix it.

Today I saw that I used the wrong order for the variables in the MYSQL(Connect…) command.