-
Notifications
You must be signed in to change notification settings - Fork 372
[Tutorial] How to add another MySQL version
Adding another MySQL version is very easy and safe with Laragon.
-
Download MySQL 5.7 (64-bit) or 32-bit: https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.18-winx64.zip
-
Extract the downloaded to: {LARAGON_ROOT}\bin\mysql\mysql-5.7.18-winx64 (see below Note for MariaDB)
C:\laragon
-- bin
-- mysql
-- mysql-5.7.18-winx64
-- .............
- Select the new version at: Laragon Menu > MySQL > Version > mysql-5.7.18-winx64
Very easy huh. That's all forks!
Hint: You might want to set up
my.ini
for your machine configuration to speed up database performance.
Hint: This tutorial also applies for MariaDB.
https://downloads.mariadb.org/mariadb/10.2.6/#os_group=windows
Download the MariaDB 64-bit version
Note: If you use MariaDB, extract it to: {LARAGON_ROOT}\bin\mysql\mariadb-10.2.6-winx64
, Laragon will automatically create a corresponding data directory for MariaDB on {LARAGON_ROOT}\data\mariadb-{VERSION-NUMBER}
.
MySQL >= 8.4 has removed plain [native] passwords and my.ini is a different template from MySQL 8.0. Additional steps are required to install it (see the guide [https://gist.github.com/meorajrul/b57803bf1b4ddfd2f93e6ad37c3ac5f2] by @MeorA for full details). But in essence, before attempting to run the new version of MySQL you need to do a few simple steps:
- In Laragon, select the new version of MySQL but do not start it yet (because you need to find out the random password and change it).
- Edit the
my.ini
file in the new MySQL or MariaDB product version directory and remove the linedefault_authentication_plugin=mysql_native_password
. Save the file and make themy.ini
file read-only from file properties. - Open a command prompt in
{LARAGON_ROOT}\data
and if necessary create a newmysql-{VERSION-NUMBER}
sub-directory, and CD to that sub-directory. - Run
mysqld --initialize --datadir="{LARAGON_ROOT}\data\mysql-{VERSION}" --basedir="{LARAGON_ROOT}\bin\mysql\mysql-{VERSION}" --console
replacing the directory names as necessary. When you get an output line which saysA temporary password is generated for root@localhost:
then make a note of / select and copy the random password that was generated. - From Laragon, open Heidi (session manager), type or paste the password into the password box and click
Save
. - In Laragon, Start MySQL/MariaDB and check that it starts OK.
- In Heidi, connect to the database (you may need to restart Heidi). It should prompt you to change the root password. Once you have done this...
- In Laragon, Stop and Start MySQL/MariaDB again to make sure that the password change has worked, and check that Heidi can also connect.