# Mysql Setup

Download mysql connector for windows and install

{% file src="<https://664948176-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdX27l90MHtjXhtBupXys%2Fuploads%2FkQ4mx75zil8XE6Me9osV%2Fmysql-connector-c%2B%2B-8.0.33-winx64.msi?alt=media&token=8507aef0-53aa-4d06-8a63-c861ae7bacf5>" %}

**open cmd**

```
setx mysql_config "C:\path\to\mysql_config"
```

then

```
pip install mysqlclient
```

if face any problem try&#x20;

```
pip install mysqlclient --global-option=build_ext --global-option="-I/path/to/mysql/include"
```

**open project settings.py**

```
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'your_database_name',
        'USER': 'your_mysql_username',
        'PASSWORD': 'your_mysql_password',
        'HOST': 'localhost',  # Or the MySQL server's hostname
        'PORT': '3306',       # Or the port MySQL is listening on
    }
}

```
