Forum Moderators: coopster
This should have been the simplest thing...
A combination of adding new pages into the mysql tables, growing log files + yum cache filled up the /var partition to the point that mysql hung with a plaintive "Waiting for someone to free space..." (Disk is full ... Errcode: 28) whilst trying to optimise a large table.
There was plenty of disk space elsewhere, so--after taking down both apache + mysql, moved the entire /var/lib/mysql tree to another partition, changed all the my.cnf directory-references and restarted apache + mysql.
All pages then gave the bare "Cannot connect to the Database-server at this time." in the connect-script, although command-line mysql worked fine. When I reversed all of the above paragraph everything was back to normal.
I have checked php.ini, /etc/httpd/conf.d/php.conf and /etc/php.d/mysql.ini for another directory config and can find nothing. Likewise with a web-search. SELinux is disabled.
What have I missed?
It took another day to search out but, as always, 'The Truth is out there':
mysql.default_hostis undefined (default), then the default value is 'localhost:3306'" and " Whenever you specify "localhost" or "localhost:port" as server, the MySQL client library will override this and try to connect to a local socket"
It seems to my innocent mind that the obvious thing would have been to pick up the location from the my.cnf file(s) but then, what do I know? The PHP developers have now had spats with both the Apache developers *and* the MySQL developers. Well done, chaps.