Database-list ignores a supplied database name and instead uses
"mysql". It is possible that a mysql userid has permissions to issue
"show databases" but no permission to connect to db "mysql".
database-list gives an error in this scenario.
The following patch overcomes this by using the user-supplied db name
or else "mysql" if nil supplied.
(defmethod database-list (connection-spec (type (eql :mysql)))
(destructuring-bind (host name user password &optional port) connection-spec
- (declare (ignore name))
- (let ((database (database-connect (list host "mysql" user password port) type)))
+ (let ((database (database-connect (list host (or name "mysql") user password port) type)))
(unwind-protect
(progn
(setf (slot-value database 'clsql-sys::state) :open)