Joomla! and MySQL 8.0.12

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 😉

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 !

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

4 Comments

  1. 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.

Leave a Reply to Weekly Reading for Week of 08-18-2018 | Digital Owl's ProseCancel Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

As MySQL Community Manager, I am an employee of Oracle and the views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

You can find articles I wrote on Oracle’s blog.