This article applies to:
[ Zend Platform 2 and up ]
[ Linux ]
Scenario
The Zend Platform GUI uses a proprietary MySQL database that is installed in /usr/local/Zend/MySQL by default.
Failure to access this database will result in an error logging into the Zend Platform GUI.
Check list
In case the Platform MySQL server is not running
Execute the command to start the MySQL server:
/usr/local/Zend/MySQL/bin/mysql.sh start
Your path may be different from the above. Platform GUI will probably hint you about the correct location of the MySQL startup script.
If you are still unable to log-in,
check the permissions on the /usr/local/Zend/MySQL/var directory and its contents.
The files should have the same owner/group as your Apache processes (nobody, www-data etc.)
In case you have error 111:
"Database error: Cannot open db, Can't connect to local MySQL server through socket '/opt/Zend/Platform/MySQL/var/mysql.sock' (111)"
When /usr/local/Zend/MySQL/bin/mysql.sh restart (or platform_init.sh restart) doesn't load MySQL (check process list), you can try to rename the temporary process files in the following directories (path may vary according to installation)
mv /opt/Zend/Platform/MySQL/var/mysql.pid{,.old}
mv /opt/Zend/Platform/MySQL/var/mysql.sock{,.old}
mv /opt/Zend/Platform/tmp/mysql.app{,.old}
mv /opt/Zend/Platform/tmp/mysql.wd{,.old}
In case there are more than single instance of Apache running
In this case connecting to the DB from the GUI might be problematic.
Try to leave only one Apache server running and check if it solves the problem