Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm setting up development environment on Mac OSX.

However the PHP web application can't connect the mysql server installed with Zend Server CE.

The error information is below,

[Type] dbnot_connect
[2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 61

Mysql database can be accessed via phpAdmin installed with Zend Server CE as well.

The same code works well on Windows or Linux in Zend Server CE.

share|improve this question
    
Is the phpMyAdmin installed on the server or on your development environment? It could be an issue with your bind not allowing outside of localhost access. If this is not the case then check your connection string to make sure that it's coded properly. –  kobaltz Mar 25 '12 at 6:19
    
phpMyAdmin is installed my Mac as well. It can access mysql server(installed on Mac). And the code is checked out from source control, it works well to linux/windows to access the mysql installed with Zend Server on linux/windows. –  Kane Mar 25 '12 at 6:50

1 Answer 1

Try connecting on the command line to mysql - perhaps you need to specify a different port? Also there is the issue of the file /var/mysql/mysql.sock in Lion - you have to link this file. Here's a list of instructions: http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.