Documenting how I updated from MySQL 5.7.3
to 8.0.29
on my 2019 MacBook Pro (intel processor, running macOS Monterey v12.4).
There are many options for how to download, upgrade, and/or configure local MySQL versions. Following these steps worked for me, but may not be the correct choice for everyone.
🥾 Steps
-
Preparation. This process results in loss of any existing local databases. I didn’t have any that I needed to keep, but if I had I would have exported & backed up those databases.
-
Download the latest General Availability Community Download - https://dev.mysql.com/downloads/mysql/
Downloads must be compatible with your machines processor & OS. For my MacBook I needed the
macOS 12 (x86, 64-bit)
package. I chose to download the.dmg
file. -
Open the
.dmg
file once it has downloaded & complete installation. -
Check that MacBook is now using MySQL version 8.* & update
$PATH
.In the terminal run
mysql --version
The first time I ran this command I received an
Unknown command
error. I needed to set a$PATH
variable that points to the freshly downloaded binaries.I checked
System Preferences > MySQL
to find the correct value to use.Since I use fish I used the
fish_add_path
command to add my new path value. Restarting my terminal and runningmysql --version
again confirmed that myPATH
had been updated. -
Initialize local database.
At this point I set a password for my root user. If you use any software that is compatible with MySQL version 5. you must use legacy authentication*
-
Download compatible version of workbench.
I use mysql workbench during development and needed to download a version compatible with MySQL 8.*.
Similar to downloading the community server, I downloaded a version compatible with my computer & followed the installation prompts.