由于我升级到了Django 1.4.5,并删除并重新创建了一个MySQL 5.5.8数据库,因此在./manage syncdb上收到以下错误消息
Superuser created successfully.
Installing custom SQL ...
Installing indexes ...
Failed to install index for my_app.WorldBorder model:
(1464, "The used table type doesn't support SPATIAL indexes")设置:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.gis', <---- here
'pipeline',
'widget_tweaks',
'my_app',
'south',
'modeltranslation',
'djcelery',
)但我已经下载并编译了Geos,到目前为止它总是有效的:
wget http://download.osgeo.org/geos/geos-3.3.0.tar.bz2
tar xjf geos-3.3.0.tar.bz2
auto-apt run ./configure
make -j4
sudo checkinstall
sudo ldconfig我是不是遗漏了什么?
发布于 2013-05-10 07:54:45
如果数据库类型不是myisam,创建空间索引将返回错误:
错误1464 (HY000):使用的表类型不支持空间索引
您可以将数据库类型更改为myisam,此示例将执行以下操作:
alter table geom engine=myisam;有关参考信息,请查看此处的文档http://dev.mysql.com/doc/refman//5.5/en/creating-spatial-indexes.html
https://stackoverflow.com/questions/15140785
复制相似问题