> For the complete documentation index, see [llms.txt](https://olee-tech.gitbook.io/django/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://olee-tech.gitbook.io/django/mysql-setup.md).

# Mysql Setup

Download mysql connector for windows and install

{% file src="/files/vLmf34h5wh881VykFXpm" %}

**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
    }
}

```
