一、问题描述
Django中执行create database charset=utf8;命令报错:ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘=utf8‘ at line 1
二、问题原因
数据库名称没有用反引号引起来
三、解决方案
创建数据库时使用以下命令即可:
create ‘ database‘ charset=utf8;
Django中创建数据库报错:ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=utf8' at line 1解决方案
原文地址:https://www.cnblogs.com/lxmtx/p/13334473.html