MySQL database connection error (post joomla 2009.07 installation)

Bug #398367 reported by Alon Swartz on 2009-07-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TurnKey Linux
Fix Released
Alon Swartz

Bug Description

Database Error: Unable to connect to the database:Could not connect to MySQL
Many thanks to Janadmin who first reported this.

Alon Swartz (alonswartz) on 2009-07-12
Changed in turnkeylinux:
assignee: nobody → Alon Swartz (alonswartz)
importance: Undecided → High
status: New → In Progress
Alon Swartz (alonswartz) wrote :

Temporary fix

For those who have already downloaded the 2009.07 release, the issue can be remedied by running the following command:


Alon Swartz (alonswartz) wrote :

We tracked down the cause of this issue to a sanity check raising an exception in one of the installer hooks, let me explain.

The installer hook 40regen-joomla-secrets job is to regenerate a random Joomla secret key as well as set a random password for the Joomla MySQL account.

Joomla's configuration files were updated with the new password, and the call was made to the di-live component 72mysql-conf to update the database accordingly. An exception was raised and the password was never set, so Joomla could not connect to MySQL post installation:

Database error: Unable to connect to the database

Q: But then why was the MySQL root password set correctly?
A: Because the live-installer hooks and di-live components are run in different contexts (ie. one in the chroot, other not).

Q: But its always been like this, why was an exception raised now?
A: 70mysql-conf has been thoroughly updated for our upcoming release to support new and exciting use-cases (more to come on this). One of which requires that there is only one unique instance of MySQL started when not running within a chroot. One of the sanity checks raised an exception when it received an unexpected exitcode due to the pre-initialization state of MySQL in the new installation.

The fix was simple, but the consequences were severe. This issue should never had made its way into a release, and for that we apologize. We have updated our testing protocol to make sure history doesn't repeat itself.

I am currently uploading a new version to be released.

Alon Swartz (alonswartz) wrote :

Fix released in Joomla 2009.07.1

Changed in turnkeylinux:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers