I am following this tutorial to build a Django app with MySQL.
I am using XAMPP-VM for Mac. I set up my Database settings for Django as so:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoproject',
'USER': 'root',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '8080',
}
}
And I have started MySQL on XAMPP but when I run python manage.py migrate I get:
django.db.utils.OperationalError: (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)")
Thank you for your help!