? ? ? Pending

User tests: Successful: Unsuccessful:

avatar BilalReffas
BilalReffas
1 Aug 2018

Summary of Changes

Joomla 4.0 don't work with MySQL 8 without a workaround.

Please follow these introductions from this wiki I wrote to make Joomla 4.0 and MySQL 8 working.
Joomla 3.8, 3.9 are working fine as well with this workaround.

I add a link to the error message to help some users who wants to use Joomla with MySQL 8.

Before

bildschirmfoto 2018-07-30 um 09 18 08

After

bildschirmfoto 2018-08-01 um 12 18 31

Test instructions

Please open your configuration file sudo nano /etc/my.cnf (Please note that your file may be under a different directory) and add the following configuration:

[mysqld]
default-authentication-plugin=mysql_native_password

If you don't have access to your config file then you can update your user as follows:

ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

Replace username with the name of the user account and password with the password belonging to the account. Restart MySQL and you are done, well only if you have Joomla 3.8 or 3.9 installed.

If you want to work with Joomla 4.0 you have to do some extra work, because the administration dashboard is blank after the installation with Joomla 4.0 and MySQL 8.


Fortunately there is a fix for that too!
MySQL 8 is returning Incorrect date value: '0000-00-00' after running following insertion from the installation file /installation/sql/mysql/joomla.sql.

The following query must be run to fix this. Replace #_ with your table prefix.

UPDATE `#__modules` SET `checked_out_time` = '1000-01-01 00:00:00', `publish_up` = '1000-01-01 00:00:00', `publish_down` = '1000-01-01 00:00:00';

This is happening because since MySQL 5.7, MySQL stops supporting zeros value in date / datetime. Restart MySQL and you are done!

avatar BilalReffas BilalReffas - open - 1 Aug 2018
avatar BilalReffas BilalReffas - change - 1 Aug 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Aug 2018
Category Installation Language & Strings
avatar brianteeman
brianteeman - comment - 1 Aug 2018

Thank you for this but wouldnt it be better to make joomla work with mysql8 that point people to a wiki

avatar BilalReffas
BilalReffas - comment - 1 Aug 2018

This is explained in the wiki, its not a Joomla issue, it's a PHP issue

avatar brianteeman
brianteeman - comment - 1 Aug 2018

In that case your documentation is wrong. As I read that link to the php issue then its only for a specific version of php 7.2.8 and not generic to mysql8 and joomla. Your documentation implies that the problem is for everyone trying to use joomla with mysql8

avatar roland-d
roland-d - comment - 1 Aug 2018

@brianteeman The issue @BilalReffas linked in his last comment is the wrong one as that indeed seems related to a specific PHP version. However in the wiki we have the link to the PHP 7.3 commit, which is this one: php/php-src@d6e81f0

This fixes the MySQL 8 authorization in PHP.

Your documentation implies that the problem is for everyone trying to use joomla with mysql8

That is exactly the case. The reason is because they changed the password hashing. This is not something we can fix in Joomla, the PHP MySQL client must be updated.

This is not only Joomla but any PHP application and even Sequel Pro on Mac for example. These won't work until the clients are updated to handle the new password mechanism.

avatar brianteeman
brianteeman - comment - 1 Aug 2018

Surely the correct way to "resolve" this is to add a test for mysql8 in the preinstall check and display any message there. Displaying it here on every database installation error will just confuse people - remember most users wouldnt know if they were using mysql8 or not.

avatar mbabker
mbabker - comment - 1 Aug 2018

Surely the correct way to "resolve" this is to add a test for mysql8 in the preinstall check and display any message there.

Except you can't. Because to get the database version, the client has to be able to connect to the server, and right now we can't even reliably establish a connection.

avatar BilalReffas
BilalReffas - comment - 1 Aug 2018

Yeah correct @mbabker

avatar brianteeman
brianteeman - comment - 1 Aug 2018

This still seems very wrong to me. How are other lamp apps handling this?

avatar BilalReffas
BilalReffas - comment - 1 Aug 2018

Other applications are using the mysql_native_password as a workaround as well.

avatar BilalReffas BilalReffas - change - 1 Aug 2018
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 1 Aug 2018

@lefred any thoughts on this?

avatar brianteeman
brianteeman - comment - 1 Aug 2018

@BilalReffas Also your wiki article says

The following queries must be run to fix this. Replace #_ with your table prefix.

But there is only one query

avatar BilalReffas
BilalReffas - comment - 1 Aug 2018

Thank you I will change the wiki @brianteeman. Just for clarification is just one query.

avatar BilalReffas
BilalReffas - comment - 2 Aug 2018

Some updates on this?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Aug 2018

@BilalReffas next Step: PR needs minimum 2 successfully Tests.

avatar BilalReffas
BilalReffas - comment - 2 Aug 2018

Who will do it @franz-wohlkoenig ? :)

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Aug 2018

all you can do is give Test Instructions which Volunteers can understand (please consider not all are Developers, maybe most of them).

avatar BilalReffas
BilalReffas - comment - 2 Aug 2018

Everyone should follow these introductions from this wiki I wrote.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Aug 2018

I would write the Steps here too to make it as easy as possible for Tester to decide if they can/want test and don't have to look on another Site.

avatar BilalReffas
BilalReffas - comment - 2 Aug 2018

Okay I will update the text of my pull request

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Aug 2018

hope this works.

avatar BilalReffas BilalReffas - change - 2 Aug 2018
The description was changed
avatar BilalReffas BilalReffas - edited - 2 Aug 2018
avatar BilalReffas BilalReffas - change - 2 Aug 2018
The description was changed
avatar BilalReffas BilalReffas - edited - 2 Aug 2018
avatar BilalReffas
BilalReffas - comment - 2 Aug 2018

I updated the test instructions

avatar niklas-deworetzki-thm niklas-deworetzki-thm - test_item - 2 Aug 2018 - Tested successfully
avatar niklas-deworetzki-thm
niklas-deworetzki-thm - comment - 2 Aug 2018

I have tested this item successfully on 2dc281d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21339.

avatar bene-we bene-we - test_item - 2 Aug 2018 - Tested successfully
avatar bene-we
bene-we - comment - 2 Aug 2018

I have tested this item successfully on 2dc281d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21339.

avatar BilalReffas
BilalReffas - comment - 2 Aug 2018

Some updates on this?

avatar brianteeman
brianteeman - comment - 2 Aug 2018

Patience is a virtue

avatar franz-wohlkoenig franz-wohlkoenig - change - 3 Aug 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Aug 2018

Ready to Commit after two successful tests.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Aug 2018

@BilalReffas next Step: Maintainer decide if merge.

avatar wilsonge
wilsonge - comment - 6 Aug 2018

Looks good to me! Thanks!

avatar wilsonge wilsonge - change - 6 Aug 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-08-06 09:43:59
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 6 Aug 2018
avatar wilsonge wilsonge - merge - 6 Aug 2018
avatar BilalReffas
BilalReffas - comment - 6 Aug 2018

Thank you @wilsonge !

Add a Comment

Login with GitHub to post a comment