报错一:

django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.

解决方法:编辑文件,注释掉如下行:

version = Database.version_info
# if version < (1, 3, 13):
# raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)

报错二:

File "D:\data\gitee.com\ExamOnline\venv\lib\site-packages\django\db\backends\mysql\operations.py", line 146, in last_executed_query query = query.decode(errors='replace') AttributeError: 'str' object has no attribute 'decode'

解决方法:

编辑文件operations.py,注释掉如下行

query = getattr(cursor, '_executed', None)
# if query is not None:
# query = query.decode(errors='replace')
return query

Django2.2连接MySQL问题解决的更多相关文章

  1. django2.0+连接mysql数据库迁移时候报错

    django2.0+连接mysql数据库迁移时候报错 情况一 错误信息 django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 ...

  2. Django2.2 连接mySQL数据库

    一.Django2.2连接数据库(踩雷) 首先,Django2.2自带的是sqlite3数据库,但我们学的是mysql,因此学着连接(在mysql环境搭建成功的情况下)---参考博客: https:/ ...

  3. php无法连接mysql问题解决方法总结

    http://www.163ns.com/zixun/post/5295.html     本文章总结了在php开发中可能会常常碰到的一些php连接不了mysql数据库的一些问题总结与解决方法分享,有 ...

  4. 服务器远程连接mysql问题解决

    一. centos下解决远程连接不上的问题. 1.查看centos 下防火墙是否关闭: 通过进程: ps -aux |grep firewalld ps -ef |grep firewalld 通过服 ...

  5. Django2.2连接mysql数据库出现django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.3 or newer is required; you have 0.7.11.None问题

    在使用Django2.2开发的时候,想要使用mysql数据库,在settings.py文件中更改命令: DATABASES = { 'default': { 'ENGINE': 'django.db. ...

  6. django2.2连接mysql遇到的坑

    1.mysql数据库配置 2.首先需要建一个myweb数据库 3.执行数据库迁移命令makemigrations python manage.py makemigrations MySite 报错: ...

  7. MySQL远程连接丢失问题解决方法Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0

    最近远程连接mysql总是提示 Lost connection 很明显这是连接初始化阶段就丢失了连接的错误 其实问题很简单,都是MySQL的配置文件默认没有为远程连接配置好,只需要更改下MySQL的配 ...

  8. ruby -- 问题解决(一)无法连接mysql数据库

     >rails g controller home index  运行该命令时无法连接mysql 先下载配置文件:mysql-connector-c-noinstall-6.0.2-win32. ...

  9. Delphi XE中使用dbExpress连接MySQL数据库疑难问题解决(对三层的例子配置有帮助)

    Delphi IDE中包含一个Data Explorer的组件,如下图所示: 该组件基于dbExpress(包含TSQLConnection.TSQLDataSet.TSQLQuery.TSQLSto ...

随机推荐

  1. [Android] 分析一个CalledFromWrongThreadException崩溃

    1 问题描述 问题本身比较清晰简单,但推敲的过程中发现了不少有意思的东西. 在C++ SDK回调JNI至Java Observer函数中,直接操作了UI界面textView.setText(msg), ...

  2. python爬虫的入门问题

    第一张图是代码,爬的是亚马逊的一个商品网页,能爬出来内容,但是内容之间有很多空白换行,这是什么原因?要怎么解决?

  3. ConcurrentHashMap能完全替代HashTable吗?

    至此你应该能够明白,ConcurrentHashMap与HashTable都可以用于多线程的环境,但是当Hashtable的大小增加到一定的时候,性能会急剧下降,因为迭代时需要被锁定很长的时间.因为C ...

  4. python学习-21 集合 2

    集合的其他方法 1.交差补集 math = {'xm','xh','xg','xx'} english ={'xm','xh','dm','john'} print(math.symmetric_di ...

  5. (1+x)^n

    #include<stdio.h> int main() { int n,i; while(scanf("%d %d",&n,&i)!=EOF) { i ...

  6. Dubbo#编译动态扩展类

    这篇排版有问题 后面修改....**** 以ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension();为例 - ...

  7. eclipse智能提示报错(to avoid the message, disable the...)

    然后这里可能会再报别的错误  我的做法是   再重新将 code recommenders 打开 ********************************** 为什么会出现 这样错误呢 ? 简 ...

  8. C#常用数据结构

    常碰到的几种数据结构:Array,ArrayList,List,LinkedList,Queue,Stack,Dictionary<K,T>: 1.数组是最简单的数据结构.其具有如下特点: ...

  9. Swagger 实践 <一>

    参考 :https://docs.microsoft.com/zh-cn/aspnet/core/tutorials/getting-started-with-nswag?view=aspnetcor ...

  10. $.ajax()属性详解

    $.ajax()方法详解 jquery中的ajax方法参数总是记不住,这里记录一下. 1.url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. 2.type: 要求为Strin ...