我的MySql掉队了
2024-09-30 02:41:48
本来今天高高兴兴,突然:
raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table ((1064, "You have an error in your SQL sy
ntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) NOT NULL)' at line 1"))
上网上搜寻一番,发现是MySql数据库与Django不兼容的原因,我的数据库是MySql Server 5.5版本,而Django2.0以后不再支持MySQL5.5,必须5.6版本以上,所以我下载了MySql 5.7.24。
旧的MySql必须完全删除,清理干净需要删除注册表:
win + R输入:regedit
删除下面的目录
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL
或者使用能删除注册表的工具,例如UninstallTool;
下载最新的MySql:
https://dev.mysql.com/downloads/mysql/
安装教程(转):
https://blog.csdn.net/recky_wiers/article/details/79243804
MySql密码忘记:
关闭正在运行的MySQL服务
win+R输入:cmd,转到mysql\bin目录
输入:mysqld --skip-grant-tables 回车
新打开dos窗口,转到mysql\bin目录
输入mysql回车,显示已经进入mysql
输入:use mysql;
修改密码:
update user set password=password("123456") where user="root";
或者:
update user set authentication_string=password("123456") where user="root";
刷新权限:flush privileges;
关闭窗口,重新进入;
mysql里修改密码:
set password for root@localhost = password('123456');
最新文章
- linux下调整音量大小
- 程序世界系列之-struts2安全漏洞引发的安全杂谈(上)
- Protected Member Access
- Swift学习笔记一
- opencv 通过摄像头捕捉头部
- createDocumentFragment
- banner幻灯片
- programing
- Linux必备150个命令
- 网盘直链工具 winform版 V1.0
- 学习java的第4天 (2019-03-21 11:49)
- npm下载安装文件太慢..修改这个就好了..治好多年的便秘..真香预警
- leetcode3:无重复字符的最长子串
- javac编译提示错误需要为 class、interface 或 enum
- 为chrome设置代理
- Your password has expired. To log in you must change it using a client that supports expired passwords.
- PyCharm 配置远程python解释器
- git添加公钥后报错sign_and_send_pubkey: signing failed: agent refused operation
- Hadoop中RPC协议小例子报错java.lang.reflect.UndeclaredThrowableException解决方法
- 25、Django实战第25天:讲师详情页
热门文章
- EOJ3263:丽娃河的狼人传说(贪心)
- Codeforces Round #510 (Div. 2) A&;B By cellur925
- scrapy 连接错误
- 分布式集群环境下,如何实现session共享三(环境搭建)
- hdu 3172 Virtual Friends (字符串的并查集)
- 跟我一起玩Win32开发(12):使用控件——单选按钮
- Caffe实战三(依赖包解析及环境配置)
- AtCoder Grand Contest 016 F - Games on DAG
- oracle PL、SQL(概念)
- ES6学习笔记(12)----Reflect