當我嘗試查看在MySQL數據庫我得到這個錯誤:mysql錯誤:錯誤1018(HY000):無法讀取'。'的目錄。 (錯誤:13)
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.
什麼可以在c請問這個問題?
在此先感謝
你有沒有以前連接?你可以在你的設置文件中編輯,以便我們更好地瞭解發生的事情嗎? –
是的,它是 –
也許這可能是有用的,以防您的系統使用AppArmor:http://ar.zu.my/solved-show-databases-error-1018-hy000-can-t-read-dir- of-errno-13/ – user1981275