Unable to create the django_migrations table 迁移文件时报错
2017-10-13 16:07
931 查看
执行python manage.py makemigrations 报错:
raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table ((1142, "CREATE command denied to user 'bi_r'@'10.173.29.181' for table 'django_migrations'"))
原因:
当前连接数据库的用户没有schema的create权限
解决办法:
进入数据库中,执行授权命令,给该用户授权:
当然一般也不能做这种授权操作,所以直接找老大喽
raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table ((1142, "CREATE command denied to user 'bi_r'@'10.173.29.181' for table 'django_migrations'"))
原因:
当前连接数据库的用户没有schema的create权限
解决办法:
进入数据库中,执行授权命令,给该用户授权:
grant usage on schema public to username; grant create on schema public to username;
当然一般也不能做这种授权操作,所以直接找老大喽
相关文章推荐
- django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table
- Eclipse:Could not create the view: Plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.jdt.internal.ui.packageview.P
- 配置可执行文件案例--The Eclipse executable launcher was unable to locate its companion shared library.
- 布局文件预览:Rendering Problems Exception raised during rendering: Unable to find the layout for Action Bar.的解决
- 如何处理Jdeveloper 启动时出现的错误-Unable to create an instance of the Java Virtual Machine
- 关于 JDeveloper 出现 unable to create an instance of the java virtual machine 错误的解决办法
- Error while preforming database login with the "sqlserver" driver Unable to create...
- Unable to build: the file dx.jar was not loaded from the SDK folder! 问题的缺失文件
- Unable to create the pidfile.
- 关于Cygwin中编译FFmpeg时执行sh文件出现arm-linux-androideabi-gcc is unable to create an executable file.
- Unable to create an instance of the Java Virtual Machine
- RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.
- Eclipse:Could not create the view: Plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.
- MyEclipse打开JSP文件报"Failed to create the part's controls"解决方法v
- 拷贝超大文件时报错:"can not copy xxxx: Insufficent system resources exist to complete the requested service"
- MyEclipse打开JSP文件报"Failed to create the part's controls
- 【LR】The Vuser Generator is unable to create a text check in this manner .To create a text check,swich to the Server Response vie
- Oracle SQL Developer - Unable to create an instance of the Java Virtual Machine
- Eclipse:Could not create the view: Plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart. 解决方法