标签:ack mysq host sql name 配置 就是 code default
create database luffy default charset=utf8mb4;
create user luffy_user identified by ‘luffy‘; grant all privileges on luffy.* to ‘luffy_user‘@‘%‘; flush privileges;
DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "HOST": "127.0.0.1", "PORT": 3306, "USER": "luffy_user", "PASSWORD": "luffy", "NAME": "luffy", } }
import pymysql pymysql.install_as_MySQLdb()
###也就是需要先安装pymysql模块
标签:ack mysq host sql name 配置 就是 code default
原文地址:https://www.cnblogs.com/jalen-123/p/13167643.html