Fix MySQL startup error: 2002

2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)"
This commit is contained in:
Worros
2009-11-27 20:19:43 +08:00
parent b60895a89f
commit a13ae41134
3 changed files with 13 additions and 0 deletions
+2
View File
@@ -106,6 +106,8 @@ class fpdb_db:
except MySQLdb.Error, ex:
if ex.args[0] == 1045:
raise FpdbMySQLAccessDenied(ex.args[0], ex.args[1])
elif ex.args[0] == 2002:
raise FpdbMySQLNoDatabase(ex.args[0], ex.args[1])
else:
print "*** WARNING UNKNOWN MYSQL ERROR", ex
elif backend == fpdb_db.PGSQL: