1 Eylül 2010 Çarşamba

Timeout error in Mysql connection via Doctrine and Symfony

If you have used a local mysql server and decided to port to an external one, you might have a problem that symfony can not connect to the external db. It can't even get a response from the server.

If you experience that kind of issue, the thing might be that you forgot to include "host=" in your dsn definition.

dsn: 'mysql:your-server-url;dbname=your-dbname'

dsn: 'mysql:host=your-server-url;dbname=your-dbname'

Notice the difference, which is 'host='. It is also forgotten on docs, not written neither on Practical Smyfony nor Definitive Guide. So you might also forget. It does not make a problem if you simply connect to a local mysql server.

Hiç yorum yok:

Yorum Gönder