Skip to content

Instantly share code, notes, and snippets.

@meorajrul
Last active July 13, 2025 18:42
Show Gist options
  • Save meorajrul/b57803bf1b4ddfd2f93e6ad37c3ac5f2 to your computer and use it in GitHub Desktop.
Save meorajrul/b57803bf1b4ddfd2f93e6ad37c3ac5f2 to your computer and use it in GitHub Desktop.
Laragon Multiple MySQL Database Version Setup

Pre-requisite

  1. Laragon
  2. Multiple DB are ready to install (look table below)
  3. Unzip tools like 7zip or Winrar
  4. Laragon installation path default is C:\laragon\, might be different depending on where you install this. However we will focus on laragon mysql directory folder which located on C:\laragon\bin\mysql

If you look at Laragon documentation on multiple DB it should be straight forward however i would like to make it as painless as possible with the setup

By default Laragon (Full version) comes with MySQL 8.0.* version. However we will install latest or older version of MySQL show how we switch to one another using Laragon system tray mysql version switch feature.

2

For this context we will use MySQL community ZIP version that does not have any debugging binary and test suite (keep the size down)

MySQL Version Download Path Local Data Path
5.7.44 Link C:\laragon\data\mysql
8.0.* (Default) N/A C:\laragon\data\mysql-8
8.4 LTS Link C:\laragon\data\mysql-8.4

Steps for MySQL 8.4

  1. Download and unzip the file to C:\laragon\bin\mysql. Your folder structure should look like this after extract. image
  2. Open command line using CMDer (default terminal by Laragon) and run:
cd C:\laragon\bin\mysql\mysql-8.4.0-winx64\bin
mysqld --initialize --datadir="C:\laragon\data\mysql-8.4" --basedir="C:\laragon\bin\mysql\mysql-8.4.0-winx64" --console

2-mysql init

Make sure to store those password generated in the terminal for later use. We will use it to reset root password when we start to login via HeidiSQL

  1. Copy my.ini (mysqld config) below to mysql 8.4 base folder and set it as read-only (to avoid Laragon override setting using old template)

3-1

  1. Right click on Laragon Tray and switch to MySQL 8.4 version

2-1

  1. Start services

4 5-laragon-started

  1. Open HeidiSQL or any of your DB IDEs and start accessing the table. After first login with root username and generated password, HeidiSQL will ask for new password. Key-in your desirable new password and your are done.

6-mysql password reset

[client]
#password=your_password
port=3306
socket=/tmp/mysql.sock
[mysqld]
port=3306
socket=/tmp/mysql.sock
key_buffer_size=256M
max_allowed_packet=512M
table_open_cache=256
sort_buffer_size=1M
read_buffer_size=1M
read_rnd_buffer_size=4M
myisam_sort_buffer_size=64M
thread_cache_size=8
secure-file-priv=""
explicit_defaults_for_timestamp=1
datadir= "C:/laragon/data/mysql-8.4"
basedir= "C:/laragon/bin/mysql/mysql-8.4.0-winx64"
#default_authentication_plugin=mysql_native_password
[mysqldump]
quick
max_allowed_packet=512M
@ibnudarma
Copy link

Thanks, this working

@destiny902
Copy link

I deleted original data/mysql-8 and bin/mysql/mysql-8.0.x folder, but when I click Start MySQL, it will automatically generated a data/mysql-8 folder, how to prohibit this behavior?

@JPFarber55
Copy link

JPFarber55 commented Jun 7, 2025

download all yours mysql8.X you need. I downloaded 8.2 and 8.3. Laragon already has 8.0.30 installed.
---- MySql8.3

  • Start with 8.3 - start all laragon services.
  • This create laragon\data\mysql-8
  • Stop all services.
  • Rename laragon\data\mysql-8 to laragon\data\mysql-83
  • update this path into the \laragon\bin\mysql\mysql-8.3.0-win64\my.ini (change .......\mysql-8 to ......\mysql-83)
  • Change the property of this file \laragon\bin\mysql\mysql-8.3.0-win64\my.ini to Read Only.

---- MySql8.2

  • Change laragon to mysql-82
  • Start all services with 8.2
  • This create again laragon\data\mysql-8
  • stop all serces.
  • Rename laragon\data\mysql-8 to laragon\data\mysql-82
  • update this path into the \laragon\bin\mysql\mysql-8.2.0-win64\my.ini (change .......\mysql-8 to ......\mysql-82)
  • Change the property of this file \laragon\bin\mysql\mysql-8.2.0-win64\my.ini to Read Only.

---- MySql8..0.30

  • Change laragon to mysql-8.0.30
  • Start all services with 8..0.30
  • This create again laragon\data\mysql-8
  • stop all serces.
  • Rename laragon\data\mysql-8 to laragon\data\mysql-80
  • update this path into the \laragon\bin\mysql\mysql-8.0.30-win64\my.ini (change .......\mysql-8 to ......\mysql-80)
  • Change the property of this file \laragon\bin\mysql\mysql-8.0.30-win64\my.ini to Read Only.

--- Last steps
Now you can change between diferents versions of mysql8.X

When you finish with this process. Enter to any mysql you want. this will create agan laragon\data\mysql-8... You do not want to delete this last one folder because this will be created if not exist when you start services, and all your databases will be redirected to the paths you define into each mysql version folder (.ini file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment