The following steps are useful on Microsoft Windows Platform, I am using
Microsoft Windows 10 64-bit
Step 1: Create a django project either through command line interface or
through any IDE such as JetBrains PyCharm, Atom, etc...
Step 2: Observe the sub-folder name inside the django project contains the
same name as the project name.
Step 3: Notice that the sub-folder contains 4 python files named
__init__.py, settings.py, urls.py, wsgi.py
Step 4: Open the settings.py file & scroll down to the django project
database component which is default to Sq Lite.
Step 5: Remove the default settings corresponding to the Sq Lite and
Replace them by MySQL database as follows:-
{
'ENGINE': 'MYSQL',
'USERNAME': 'xxxx', # Replace xxxx with your MySQL database username.
'PASSWORD': 'xxxx', # Replace xxxx with your MySQL database password
corresponds to the username provided above.
'HOST':'localhost/remotehost', # If it is remote host, you have to provide
its IP Address., & also update the relevant IP Address in the
ALLOWED_HOSTS = [] in the settings.py file itself.
'PORT': 3306, # 3306 is default for MySQL, if you have your own replace it
by your port number
}
Step 6: Save/Refresh the settings.py
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/52a9bb07-1487-4ead-9cf8-0edff80519a3%40googlegroups.com.