phpMyAdmin & Zend Studio CE – MAC

Posted by on Jun 9, 2010 in PHP, Zend Server | Comments Off on phpMyAdmin & Zend Studio CE – MAC

Resolving phpMyAdmin mysql.sock error for MAC install of Zend Studio CE

This solution solved the error that was stated like: Can’t connect to local MySQL server through socket /tmp/mysql.sock when trying to login to phpmyadmin.

If you are getting the as described above on your MAC installation of Zend Studio CE, be sure you have edited the following files like below, if they have another value, original values commented out.

/usr/local/zend/etc/php.ini, correctly point to /tmp/mysql.sock

;mysql.default_socket = /usr/local/zend/mysql/tmp/mysql.sock
mysql.default_socket = /tmp/mysql.sock


#socket = /usr/local/zend/mysql/tmp/mysql.sock
socket = /tmp/mysql.sock

At this stage your script should connect to the database, not considering pdo issues, to the database. If for some reason you find you still can’t access phpMyAdmin, open: /usr/local/zend/share/phpmyadmin/ and find and edit to look like:

* Path to the socket - leave blank for default socket
* @global string $cfg['Servers'][$i]['socket']
$cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock'; //mine was set to ''
* How to connect to MySQL server ('tcp' or 'socket')
* @global string $cfg['Servers'][$i]['connect_type']
$cfg['Servers'][$i]['connect_type'] = 'socket'; //mine was set to tcp

After doing the steps above phpMyAdmin was properly functioning on my install.

Comments are closed.