hello i am trying to follow the tutorial but this error keeps showing when i try to access de gii model creation:
Description
PDO::__construct() [<a href='pdo.--construct'>pdo.--construct</a>]: [2002] Invalid argument (trying to connect via unix://)
im using xampp on linux ubuntu
this is my main file db config:
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=testdrive',
'emulatePrepare' => true,
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
),
—i managed to solve this using the following workaround:
'connectionString' => 'mysql:host=localhost;dbname=testdrive;unix_socket=/opt/lampp/var/mysql/mysql.sock',
or instead of conecting by unix it can be done if u change host=localhost for host=127.0.0.1