MySQL database connection error (post joomla 2009.07 installation)

Bug #398367 reported by Alon Swartz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TurnKey Linux
Fix Released
High
Alon Swartz
2008.10.17-hardy-x86
New
Undecided
Unassigned
2009.10-hardy-x86
New
Undecided
Unassigned

Bug Description

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

http://www.turnkeylinux.org/forum/support/20090710/joomla-200907-broken-due-mysql-database-connection-error

Alon Swartz (alonswartz)
Changed in turnkeylinux:
assignee: nobody → Alon Swartz (alonswartz)
importance: Undecided → High
status: New → In Progress
Revision history for this message
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:

/usr/lib/live-installer.d/40regen-joomla-secrets

Revision history for this message
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.

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.