3π
as Ignacio already has pointed out you have to modify your settings.py.
If you are using the latest version of Django (that would be 1.2.x) youe settings.py will contain this section:
DATABASES = {
'default': {
'ENGINE': '',
'NAME': '',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
Here you can define which database you are using.
In your case this section should look like this:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': '',
'USER': 'your-mysql-username',
'PASSWORD': 'your-mysql-users-password',
'HOST': 'localhost',
'PORT': '3306',
}
}
If your are running a MySQL server it is identified by its IP address (localhost = 127.0.0.1) and its port (3306). You could run several MySQL server instances on the same computer. Each of this instances could be identified by the combination of its IP and port.
Hope that helps you.
0π
By default, these are the settings you should use with WAMP/MySQL I believeβ¦
DATABASE_ENGINE = 'django.db.backends.mysql'
DATABASE_NAME = ''
DATABASE_USER = 'root'
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
- [Django]-In Django Celery how can I tell if a task has been executed asynchronously
- [Django]-I/O operation on closed file in django with 'ImageKit'
- [Django]-How to enable basic access authentication in django
0π
first install mysqldb module for python by typing following command:
easy_install mysql-python
on command prompt/python client and then modify your settings.py:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'Database Name',
'USER': 'Database Username',
'PASSWORD': 'Database Password',
'HOST': 'localhost',
'PORT': '3306',
}
}
- [Django]-Integrating Dagster with Django
- [Django]-Facebook Connect API error 191 with Django-socialregistration
- [Django]-Server lagging β Django + mongodb + cronjob