﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14717	Connection error not handled	Michal Čihař	nobody	"When there is connection error in MySQL backend, the exception is not handled and MySQL exception is thrown out of django. I think there should be try...except block around Database.connect and handle MySQLdb.OperationalError and handled somehow.

The exception looks like:

{{{
  File ""/usr/lib/python2.6/site-packages/django/db/backends/mysql/base.py"", line 297, in _cursor
    self.connection = Database.connect(**kwargs)

  File ""/usr/lib64/python2.6/site-packages/MySQLdb/__init__.py"", line 81, in Connect
    return Connection(*args, **kwargs)

  File ""/usr/lib64/python2.6/site-packages/MySQLdb/connections.py"", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)

OperationalError: (2003, ""Can't connect to MySQL server on '127.0.0.1' (111)"")
}}}
"		closed	Uncategorized	1.2		wontfix			Unreviewed	0	0	0	0	0	0
