Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pymysql.err.InternalError: (1709, 'Index column size too large. The maximum column size is 767 bytes.') #1

Closed
andyblog opened this issue May 1, 2018 · 1 comment

Comments

@andyblog
Copy link

andyblog commented May 1, 2018

环境:centos6.9 myslq-5.5.60,venv虚拟环境,按照readme中的方法进行迁移数据库 python manage.py migrate
报错:pymysql.err.InternalError: (1709, 'Index column size too large. The maximum column size is 767 bytes.')
根据百度到的方法:配置下面mysql配置,然后重启mysql,但是还是显示错误
innodb_file_format = Barracuda
innodb_file_per_table = 1
innodb_large_prefix

从mysql可以看到已经生效
mysql> show global variables like 'innodb_lar%';
+---------------------+-------+
| Variable_name | Value |
+---------------------+-------+
| innodb_large_prefix | ON |
+---------------------+-------+
1 row in set (0.00 sec)

mysql> show global variables like 'innodb_fil%';
+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| innodb_file_format | Barracuda |
| innodb_file_format_check | ON |
| innodb_file_format_max | Antelope |
| innodb_file_per_table | ON |
+--------------------------+-----------+
4 rows in set (0.00 sec)

不知是否遇到过这个问题

@Hopetree
Copy link
Owner

Hopetree commented May 1, 2018

@andyblog 我没有遇到你这种问题,但是你的MySQL版本应该是不支持utf8mb4格式吧,不知道是不是跟这个有关,你把你的数据库设置成utf8格式试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants