I suggest that Mac users install MAMP. Occasionally on the Mac, there may be a problem with XAMPP, with some of the the icons not showing up properly in Safari. Although I have not encountered any issues using XAMPP on the Mac, some students have reported some problems when trying to connect to their localhost database from Python, when using XAMPP. They reported that the problem disappeared when they used MAMP.
IMPORTANT NOTE: A student has encountered an
incompatibility error when trying to install mysqlclient
while using python 3.8 and later. This may indeed
be an incompatibility or it may be a conda thing.
Apparently, 3.8 and later is having some compatibility
issues with several packages (not just database ones).
So I tried this on a clean VM, using Anaconda with
Python 3.8.5 and then on 3.9, and I also got this
error. Before trying some of the suggestions
below, I just went ahead and did pip install
Flask-mysqldb, and lo and behold, it installed
Flask-mysqldb and also installed the dependency
mysqlclient!! If this works for you, you can
ignore the rest of this document.
You can opt to install python 3.6 instead. Or, you can use python 3.10 (Anaconda currently running PYthon 3.9) with everything else (I hope!!), and use the VM for the few labs which require flask mysqldb (which has mysqlclient as a dependency). I do know that students ran everything successfully in the Fall, 2021, semester.