Search code examples
phpmysqljoomlainstallation

Unable to connect to mySQL database during Joomla installation


I want to host a Website with Joomla on my Windows Server. Therefor I installed PHP and MySQL and downloaded the newest Joomla distribution.

I created a database and a user in MySQL with the following SQL:

create database joomlaintranet;
CREATE USER 'joomlaintranetuser'@'localhost' IDENTIFIED BY 'abc';
GRANT ALL PRIVILEGES ON joomlaintranet.* To 'joomlaintranetuser'@'localhost';

However when I start the Joomla Installation process by opening the site in a WebBrowser and then Enter the Database Information I get a 'Could not connect to MySQL server.' Error.

enter image description here

With the Shell or Workbench I can login with the given credentials. I checked also for Error Logs but didn't find any Entries in the MySQL Logs.

When checking online for similiar problems the only reasons I found where Typos or wrong Host entrences.


Solution

  • I was able to solve the issue thx to Webdongle from the Joomla Forum.

    The issue I was facing was due to the new SHA-256 Password Encryption introduced in MySQL 8. With witch PHP and therefor Joomla can't deal yet.

    Since my MySQL installation was only for the purpose of this Website, I just reinstalled it with the Legacy Authentication Method for now.

    enter image description here

    Theres also this Workaround possible.