I second MAMP or MAMP Pro if you want a simplier GUI or the ability to easily switch between multiple versions or environments.
Another solution would be to pay for an inexpensive virtual server in the cloud. There are many choices out there with many having free product tiers with resources restrictions: https://www.linode.com/pricing/
Another solution would be to use virtualization to install a second operating system (or two) on your Mac: https://mac.getutm.app/. You could have a Windows VM for MS Access and a Fedora installation for MySQL, and others.
And one final solution is to buy a cheap PC, install what you need, and put it under the desk somewhere and then use the Microsoft Remote Desktop client to connect to it from your Mac when needed. I do this daily by having a Windows PC in the server room at work (for mostly MS Access), and connecting to it from my MacBook Air as needed.