In your /protected/config/main.php, update the variables ['db']['enableProfiling'] as well as a add CProfileLogRoute class. It should look like the following:
<?php
return array(
"db" => array(
"enableProfiling" => true;
"connectionString" => "mysql:host=localhost;dbname=db_name",
"emulatePrepare" => true,
"enableParamLogging" => true,
"username" => "root",
"password" => "",
"charset" => "utf8",
),
"log" => array(
"class" => "CLogRouter",
"routes" => array(
array("class" => "CProfileLogRoute"),
array("class" => "CFileLogRoute", "levels" => "error, warning, trace",),
),
),
);
?>
This is for the PHP framework Yii Framework.