【发布时间】:2012-06-19 10:51:44
【问题描述】:
当我尝试在 mysql 中查看数据库时,我收到此错误:
ERROR 1018 (HY000): Can't read dir of '.' (errno: 13)
这会阻止我的应用显示...
我的 django 调试器说:
(2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/my_database' (13)")
这是我的设置文件:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'my_database', # Or path to database file if using sqlite3.
'USER': 'root', # Not used with sqlite3.
'PASSWORD': '****', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '3306', # Set to empty string for default. Not used with sqlite3.
什么可能导致问题?
提前致谢
【问题讨论】:
-
您以前连接过吗?您能否在您的设置文件中进行编辑,以便我们更好地了解正在发生的事情?
-
如果您的系统使用 AppArmor:ar.zu.my/…
标签: python mysql database django permissions