File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -152,10 +152,10 @@ class Connection:
152152 *,
153153 user = None , # The first four arguments is based on DB-API 2.0 recommendation.
154154 password = " " ,
155- host = ' localhost ' ,
155+ host = None ,
156156 database = None ,
157157 unix_socket = None ,
158- port = 3306 ,
158+ port = 0 ,
159159 charset = " " ,
160160 sql_mode = None ,
161161 read_default_file = None ,
@@ -234,8 +234,8 @@ class Connection:
234234 self ._echo = echo
235235 self ._last_usage = self ._loop.time()
236236
237- self ._host = host
238- self ._port = port
237+ self ._host = host or " localhost "
238+ self ._port = port or 3306
239239 if type (self ._port) is not int :
240240 raise ValueError (" port should be of type int" )
241241 self ._user = user or DEFAULT_USER
@@ -296,7 +296,7 @@ class Connection:
296296 self ._connected = False
297297 self ._reader: Optional[StreamReader] = None
298298 self ._writer: Optional[StreamWriter] = None
299-
299+
300300 def _create_ssl_ctx (self , sslp ):
301301 if isinstance (sslp, ssl.SSLContext):
302302 return sslp
@@ -1277,10 +1277,10 @@ class LoadLocalFile:
12771277
12781278def connect (user = None ,
12791279 password = " " ,
1280- host = ' localhost ' ,
1280+ host = None ,
12811281 database = None ,
12821282 unix_socket = None ,
1283- port = 3306 ,
1283+ port = 0 ,
12841284 charset = " " ,
12851285 sql_mode = None ,
12861286 read_default_file = None ,
You can’t perform that action at this time.
0 commit comments