Featured post
php - "Lost connection to MySQL server" when trying to connect to remote MySQL server -
i using zend framework develop application , try connect remote mysql database in lan.
the database connection settings in zend follows:
[general] db.adapter = pdo_mysql db.params.host = 192.168.1.2 db.params.port = 3306[live:general] db.params.username = root db.params.password = ** db.params.dbname = djudd
[development:general] db.params.username = root db.params.password = ** db.params.dbname = stellarengine
i got following error:
fatal error: uncaught exception 'pdoexception' message 'sqlstate[hy000] [2013] lost connection mysql server @ 'reading initial communication packet', system error: 111' in /usr/share/php/zend/db/adapter/pdo/abstract.php:129 stack trace: #0 /usr/share/php/zend/db/adapter/pdo/abstract.php(129): pdo->__construct('mysql:host=192....', 'root', 'password', array) #1 /usr/share/php/zend/db/adapter/pdo/mysql.php(96): zend_db_adapter_pdo_abstract->_connect() #2 /usr/share/php/zend/db/adapter/abstract.php(448): zend_db_adapter_pdo_mysql->_connect() #3 /usr/share/php/zend/db/adapter/pdo/abstract.php(238): zend_db_adapter_abstract->query('describe
bny_c...', array) #4 /usr/share/php/zend/db/adapter/pdo/mysql.php(156): zend_db_adapter_pdo_abstract->query('describebny_c...') #5 /usr/share/php/zend/db/table/abstract.php(823): zend_db_adapter_pdo_mysql->describetable('bny_core_module...', null) #6 /usr/share/php/zend/db/table/abstract.php(866): zend_db_table_abstract->_setupmetadata() #7 /usr/share/php/zend/db/table/abstract. in /usr/share/php/zend/db/adapter/pdo/abstract.php on line 144
please me resolve problem.
last time had type of error, had change host from: 127.0.0.1 'localhost' , worked fine.
- Get link
- X
- Other Apps
Comments
Post a Comment