Problem with MySQL and yii

I have just deployed my website on a machine with MySQL verstion "5.0.32-Debian_7etch8-log" but get the following error code :

my username, password na db are correct? any ideas how can I fix this ?

Please enable 'trace' logging and repost the SQL being generated.

The problem is in the first prepared statement "SET NAMES ?", I fixed it with the emulatePrepare option, but why this happens and how can I use it without emulation.

Can you post your code as well?

Quote

The problem is in the first prepared statement "SET NAMES ?", I fixed it with the emulatePrepare option, but why this happens and how can I use it without emulation.

see http://www.yiiframew…ePrepare-detail

there is no code, it just happens upon connecting to the database.

Yeah, gotcha. It could be in the PDO layer as well. Are you running the latest version?

I still would love to see the trace output on the SQL being generated.