小编Mar*_*che的帖子

NameError: name '_mysql' is not defined after setting change to mysql

I have a running Django blog with sqlite3 db at my local machine. What I want is to

  1. convert sqlite3 db to mysql db
  2. change Django settings.py file to serve MySQL db

Before I ran into the first step, I jumped into the second first. I followed this web page (on MacOS). I created databases called djangolocaldb on root user and have those infos in /etc/mysql/my.cnf like this:

# /etc/mysql/my.cnf

[client]
database=djangolocaldb
user=root
password=ROOTPASSWORD
default-character-set=utf8
Run Code Online (Sandbox Code Playgroud)

Of course I created db, …

python mysql database sqlite django

19
推荐指数
8
解决办法
2万
查看次数

标签 统计

database ×1

django ×1

mysql ×1

python ×1

sqlite ×1