DEV Community

Dendi Handian
Dendi Handian

Posted on • Updated on

Adding MySQL 8 to Laragon

Using MySQL 5.7 for development still comfy for you, right? But why don't you try the higher version since it will give you higher read/write performance (ref)

I hope we never find any new production app created using MySQL 5.7 ever again. We need to break this "curse" for PHP developers.

Downloading the MySQL 8 Binary

Go to the official download page dev.mysql.com/downloads/mysql and you may find the latest MySQL 8 Community Server version available.

mysql8 download link

Hit the download button and on the next page may want to register oracle account first or just start the download directly by clicking the "No, just start my download" link.

Extract and Move

After you downloaded the binary, extract it and move the extracted folder to the C:\laragon\bin\mysql directory (your custom location may differ) as you may find the existing mysql 5.7 here.

laragon mysql directory

Don't start the server yet, because we will have error issue like this.

mysql 8 error on laragon

Upgrade Existing MySQL 5.7 data into MySQL 8

According to the forum, we only need to rename the existing mysql data folder.
Go to C:\laragon\data and you will find mysql folder. Rename it into mysql-8.

if you started the server first to find out the error, it will generate mysql-8. you could rename it into another name and make the existing mysql folder into mysql-8

Start The MySQL 8 Server

Go to laragon dashboard, and you will find the mysql 8 menu click on it to select the version and start the mysql server as you usually do.

mysql 8 on laragon dashboard

And it will start and run normal.

Image description

Top comments (1)

Collapse
 
maaz0313 profile image
Maaz Azeemi

'mysqld' is not recognized as an internal or external command,
operable program or batch file.