X-Git-Url: https://git.jsancho.org/?p=mojodb.git;a=blobdiff_plain;f=MySQL.py;h=ba00c333349485a6fd7d2549826d1e7cc5654734;hp=e983a670fa957f2d082f21b6c41a729512a05716;hb=50430eeab5d7e3c1fbb3a130f2d26dc28d5f45da;hpb=aa509ddc8574e0a5220c94a2b72f4d5a798d6e8a diff --git a/MySQL.py b/MySQL.py index e983a67..ba00c33 100644 --- a/MySQL.py +++ b/MySQL.py @@ -84,9 +84,10 @@ class Connection(connection.Connection): Constraint = Constraint Literal = Literal - def __init__(self, *args, **kwargs): - self._db_con = MySQLdb.connect(*args, **kwargs) - self._db_con_autocommit = MySQLdb.connect(*args, **kwargs) + def __init__(self, host="localhost", user="", passwd="", *args, **kwargs): + self._db_con = MySQLdb.connect(host=host, user=user, passwd=passwd) + self._db_con_autocommit = MySQLdb.connect(host=host, user=user, passwd=passwd) + super(Connection, self).__init__(*args, **kwargs) def query(self, sql, db=None): if db is None: