To limit number of mysql connection per user, edit /etc/my.cnf vi /etc/my.cnf In [mysqld] section, set value for max_user_connections. [mysqld] max_user_connections=40 This will limit mysql connections at a time for any user to 40.
On a new apache/mysql installation, i got following error when connecting to mysql database in zend framework. This is because no socket /tmp/mysql.sock exists. Can be fixed by symlink to actual socket. To find mysql socket, in mysql command prompt