As other CMS using MySQL and PHP, Joomla! is not yet 100% ready to work with MySQL 8.0 out of the box.
I’ve been contacted by Brian Teeman to give my opinion and some tips… so here is the blog post 😉
@lefred If you could offer some advice on this #joomla #mysql 8 issue it would be appreciated https://t.co/FS37GVunEO
— ((( Brian Teeman ))) (@brianteeman) August 1, 2018
For Joomla!, I’ve tried the latest 4.0.0 Alpha 4 available for download. I’m also using PHP 7.0.31 and the new MySQL 8.0.12.
Database and User Creation
First let’s create a user (joomla/joomla) and a database. I won’t change the authentication method yet and let the default:
Joomla! Installation Wizard
And now we can start Joomla!’s installation wizard:
So far, all good, let’s jump the the database settings:
And when we click on “Install Joomla >“….
Expected problem… as of course PHP is not supporting the new default ‘caching_sha2_password
‘ authentication method (check this previous post to know more about it).
So let’s change the authentication method for our user joomla
:
Let’s try again…
KABOUM, again the same error…, we also need to change my.cnf to let know the server that the default authentication method is ‘mysql_native_password
‘.
So in my.cnf, in the [mysqld] section we add:
default_authentication_plugin = mysql_native_password
And we restart mysqld
.
Let’s try again to clik on “Install Joomla >“….
Wooohooo it works \o/
However this is not yet enough… as if you click on “Complete & Open Site“, we can see that there is a problem:
We should see more… we don’t see the complete site.
As explained in the Joomla! wiki page for MySQL 8, we need to run a specific query:
Now we can refresh our Joomla! page and…
Taaaadaaam ! It works ! Not that complicated after all 😀
Conclusion
So, in conclusion, to run Joomla! with MySQL 8.0 you need:
- to use
mysql_native_password
as authentication method as default in the server - be sure your created user uses
mysql_native_password
as authentication method - run one
UPDATE
query as described in the Joomla! wiki page.
You can easily verify the authentication method for a user running:
and the default authentication method like this:
That’s all for now and enjoy Joomla! with MySQL 8.0 !
[…] good news for all PHP CMS users like Drupal and Joomla!, PHP 7.2.8 (available on Remi’s repo for those using rpms) supports the new MySQL 8.0 default […]
Depending on how you have your mysql setup it might be easier to change the default authentication method via the persist option and then restart mysqld using restart both of which in 8.0 are new and can be done from the SQL prompt. Saves a bit of time and effort.
[…] Joomla! and MySQL 8.0.12 […]
[…] – Joomla! and MySQL 8.0.12 […]