django, phpmyadmin and mysql? -


i start using django mysql, instead of sqlite time, experience using msql through xampp, manipulating databases through phpmyadmin. keep gui interaction mysql , not have through command line.

can start , manage mysql database using xampp/phpmyadmin, , use django web development side using django'sn development server?

or have start new databases through command line, , if how done, bearing in mind ever use mysql through xampp/phpmyadmin?

i know how link , manage database through django, dont know how start mysql 1 through it, , dont want have loose mysql gui comes xampp/phpmyadmin. appreciated.

you can manage mysql through xampp interface. try setting db_host in settings.py "localhost". if doesn't work, try "127.0.0.1". typically caused python-mysql module expecting mysql unix socket in place is. actually, i'm unsure if mysql server uses unix socket on windows. anyway, 1 of both should work :) can use credentials use login phpmyadmin django. many consider bad style use root non-administration tasks (and agree), starters , on development machine isn't big of issue. phpmyadmin should work out of box django-managed databases.

my database settings.py block mysql looks this:

databases = {     'default': {         'engine': 'django.db.backends.mysql', # add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.         'name': 'dbname',                      # or path database file if using sqlite3.         'user': 'user',                      # not used sqlite3.         'password': 'password',                  # not used sqlite3.         'host': '',                      # set empty string localhost. not used sqlite3.         'port': '',                      # set empty string default. not used sqlite3.     } } 

this django 1.2 , above. replace dbname, user , password respective values , try '127.0.0.1' host if run problems. obviously, you'd need run 'manage.py syncdb' did sqlite before can use it.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -