You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>MySQL(官方发音为英语发音:/maɪ ˌɛskjuːˈɛl/ "My S-Q-L",[1],但也经常读作英语发音:/maɪ ˈsiːkwəl/ "My Sequel")原本是一个开放源代码的关系数据库管理系统,原开发者为瑞典的MySQL AB公司,该公司于2008年被升阳微系统(Sun Microsystems)收购。2009年,甲骨文公司(Oracle)收购升阳微系统公司,MySQL成为Oracle旗下产品。
>Constructor for creating a connection to the database. Returns a Connection Object. Parameters are the same as for the MySQL C API. In addition, there are a few additional keywords that correspond to what you would pass mysql_options() before connecting. Note that some parameters must be specified as keyword arguments! The default value for each parameter is NULL or zero, as appropriate. Consult the MySQL documentation for more details. The important parameters are:
191
169
@@ -205,25 +183,25 @@ connect(parameters...)
205
183
- cursorclass: cursor class that cursor() uses, unless overridden. Default: MySQLdb.cursors.Cursor. This must be a keyword parameter.
206
184
- use_unicode: If True, CHAR and VARCHAR and TEXT columns are returned as Unicode strings, using the configured character set. It is best to set the default encoding in the server configuration, or client configuration (read with read_default_file). If you change the character set after connecting (MySQL-4.1 and later), you'll need to put the correct character set name in connection.charset.
207
185
208
-
If False, text-like columns are returned as normal strings, but you can always write Unicode strings.
186
+
>If False, text-like columns are returned as normal strings, but you can always write Unicode strings.
209
187
210
-
This must be a keyword parameter.
188
+
>This must be a keyword parameter.
211
189
212
190
- charset: If present, the connection character set will be changed to this character set, if they are not equal. Support for changing the character set requires MySQL-4.1 and later server; if the server is too old, UnsupportedError will be raised. This option implies use_unicode=True, but you can override this with use_unicode=False, though you probably shouldn't.
213
191
214
-
If not present, the default character set is used.
192
+
>If not present, the default character set is used.
215
193
216
-
This must be a keyword parameter.
194
+
>This must be a keyword parameter.
217
195
218
196
- sql_mode: If present, the session SQL mode will be set to the given string. For more information on sql_mode, see the MySQL documentation. Only available for 4.1 and newer servers.
219
197
220
-
If not present, the session SQL mode will be unchanged.
198
+
>If not present, the session SQL mode will be unchanged.
221
199
222
-
This must be a keyword parameter.
200
+
>This must be a keyword parameter.
223
201
224
202
- ssl: This parameter takes a dictionary or mapping, where the keys are parameter names used by the mysql_ssl_set MySQL C API call. If this is set, it initiates an SSL connection to the server; if there is no SSL support in the client, an exception is raised. This must be a keyword parameter.
0 commit comments