Güngör Budak's Blog

Bioinformatics, web programming, coding in general

How to Set Up a MySQL Database for a Mezzanine Project

Share Tweet

Install MySQL server and python-mysqldb package:

sudo apt-get install mysql-server
sudo apt-get install python-mysqldb

Run MySQL:

mysql -u root -p

Create a database:

mysql> create database mezzanine_project;

Confirm it:

mysql> show databases;

Exit:

mysql> exit

Configure local_settings.py:

cd path/to/your/mezzanine/projectnano local_settings.py

Like following:

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.mysql",
        "NAME": "mezzanine_project",
        "USER": "root",
        "PASSWORD": "123456",
        "HOST": "",
        "PORT": "",
        }
    }

Note: Replace your password

Share Tweet

Questions?

Please start a discussion down below or send me an email!