[Solved] Open Db Connection

Hi everyone,

I have one problem with openning db connection.

My config:


			'connectionString' => 'mysql:host=;port=3306;dbname=name',

			'emulatePrepare' => true,

			'username' => 'xxxx',

			'password' => 'xxxx',

			'charset' => 'utf8',

			'tablePrefix' => '',

                       // 'enableParamLogging' => true,


The problem is that "Opening DB Connection" takes more than 5 sec, everytime it is 5.1/5.2 sec.

I read that it could by caused by --skip-name-resolve in db configuration, but since i dont have access to db config is there any other option to avoid this situation ?

It’s only my suspicion that it is the problem, but maybe something else is wrong?

If I run this app on localhost everything works fine.

So please, any advise?

you are connecting to a remote mysql server

maybe the problem is your internet connection

test the application in another server with a better internet access

This is lan server so it shouldnt be problem.

I check it with simple php mysql_connect and problem is still the same.

So for sure It is server/mysql configuration problem, but what is wrong I still dont know.

Even for remote server (databases) it takes about 0.04 sec.

Problem solved. Maybe someone in future will need it so:

Probably only way to fix it is to set:


in your my.cnf (mysql config)