A
A
Albadur2019-03-15 21:24:31
Django
Albadur, 2019-03-15 21:24:31

How to connect MySQL database from php project to Django project?

New to Django programming. I am rewriting a site from php to Django. Unable to connect MySQL database. I installed everything in Django, I can create empty databases and migrate to the project. When trying to
python manage.py migrate
writes
django.db.utils.OperationalError: (1049, "Unknown database 'name_of_database'")
It is clear why this database is not in mySQL (checked by show databases; in mysql). How to connect it?
I will be immensely grateful.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Vladimir Kuts, 2019-03-15
@Albadur

This is described in
https://docs.djangoproject.com/en/2.1/howto/legacy...

A
Albadur, 2019-03-22
@Albadur

Everything worked out. Filled first database dump.
sql -u USER -pPASSWORD < dumpname.sql
Then rewrote it in Django models
python manage.py inspectdb
There were problems with database migration, I solved them by removing the id lines in the models for which I was giving errors

X
xmoonlight, 2016-11-23
@xmoonlight

It's some kind of special. software for creating such schemes.
Something remotely similar: Edraw can be viewed.

E
Enrage, 2016-11-23
@Enrage

It seems to me that Autocad is suitable for this.

A
Anton Kiselyov, 2018-01-29
@zamboga

1. Visio
2. Draw.io

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question