leokhoa / laragon

Laragon is a portable, isolated, fast & powerful universal development environment for PHP, Node.js, Python, Java, Go, Ruby. It is fast, lightweight, easy-to-use and easy-to-extend.
https://laragon.org
4.42k stars 369 forks source link

MySQL 8.4.0 : default_authentication_plugin=mysql_native_password has been removed #772

Open MGeurts opened 5 months ago

MGeurts commented 5 months ago

The new mySQL 8.4.0 LTS version is out. A breaking change, anounced in the log files by previous versions, is the removing of default_authentication_plugin=mysql_native_password, because native-password authentication is deprecated. So the version switch from 8.3.0 to 8.4.0 leaves us with a non working MySQL server.

I think LARAGONs version switch algorithm for MySQL has to be altered. Thanks in advance.

MGeurts commented 5 months ago

The --default-authentication-plugin=mysql_native_password is removed, because native-password authentication is deprecated. In mysql 8.4 it's still possible to use the native_password authentication, but the parameter is renamed to --mysql-native-password=ON because it not only sets the plugin, but also activates the plugin (which is now disabled by default)

Add --mysql-native-password=ON to your args along with and remove the --default-authentication-plugin=mysql_native_password.

MGeurts commented 5 months ago

https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-0.html

gitizen1 commented 5 months ago

Add --mysql-native-password=ON to your args along with and remove the --default-authentication-plugin=mysql_native_password.

Release Notes 8.4.0

Novice here, so please forgive any oversights on my part...

Is this something to be changed on my.ini for the mysql version or somewhere in Laragon? Every new run errors out for me as a result of my.ini rewrite automatically re-inserting this line: default-authentication-plugin=mysql_native_password

MGeurts commented 5 months ago

This has to be changed in the LARAGON Core scripts. We'll have to wait for a new release, I guess.

meorajrul commented 5 months ago

see my guide here for now https://gist.github.com/meorajrul/b57803bf1b4ddfd2f93e6ad37c3ac5f2

gitizen1 commented 5 months ago

see my guide here for now https://gist.github.com/meorajrul/b57803bf1b4ddfd2f93e6ad37c3ac5f2

Still no go... I can't downgrade it either -- errors galore!

Update: The fix seems to be working now. Thanks!

abhirupnandy commented 4 months ago

Steps taken for successfully installing -

  1. extract mysql-8.4 zip to ~/laragon/bin (where you've installed laragon in windows)
  2. open the folder and open my.conf / my.ini file (make sure to keep a backup of the original file before changing the current file).
  3. remove the line --default-authentication-plugin=mysql_native_password from the file and save it.
  4. change the data directory value (one line above the modified line to C:\laragon\data\mysql-8.4 (to keep it consistent with a default installation.
  5. now in terminal, navigate to the mysql-8.4 binaries (example: cd C:\laragon\bin\mysql\mysql-8.4.0-winx64\bin)
  6. run this command ./mysqld --initialize --datadir="C:\laragon\data\mysql-8.4" --basedir="C:\laragon\bin\mysql\mysql-8.4.0-winx64" --console --mysql-native-password=ON
  7. now follow the next steps from ...

see my guide here for now https://gist.github.com/meorajrul/b57803bf1b4ddfd2f93e6ad37c3ac5f2

PS After installing, if error shows up in HeidiSQL for root password, use "Prompt for credentials" option. After typing the password (previously generated in the terminal), you'll get option to change password for first time.