Erroe When Migration To Another Server

Hello All,

Could anyone help me in that?

I was using Yii to build my website which use database on server…

I moved my website to another server in different hosting company but when i tried to access database i got this error

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2013] Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111

this is my connection settings in the main.php file


    'connectionString' => 'mysql:host=;dbname=postrecc_postrec',

    'emulatePrepare' => true,

        'username' => 'username',

        'password' => 'password',

    'charset' => 'utf8',


First step would be to check with the database server administrators if they allow connections from your new server.

Thank you very much …

I checked and they are preventing remote access to DB server …

I think i have to create DB on the new server