博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
pymysql-connect阻塞
阅读量:5887 次
发布时间:2019-06-19

本文共 4434 字,大约阅读时间需要 14 分钟。

class Connection(object):    """    Representation of a socket with a mysql server.    The proper way to get an instance of this class is to call    connect().    Establish a connection to the MySQL database. Accepts several    arguments:    :param host: Host where the database server is located    :param user: Username to log in as    :param password: Password to use.    :param database: Database to use, None to not use a particular one.    :param port: MySQL port to use, default is usually OK. (default: 3306)    :param bind_address: When the client has multiple network interfaces, specify        the interface from which to connect to the host. Argument can be        a hostname or an IP address.    :param unix_socket: Optionally, you can use a unix socket rather than TCP/IP.    :param read_timeout: The timeout for reading from the connection in seconds (default: None - no timeout)    :param write_timeout: The timeout for writing to the connection in seconds (default: None - no timeout)    :param charset: Charset you want to use.    :param sql_mode: Default SQL_MODE to use.    :param read_default_file:        Specifies  my.cnf file to read these parameters from under the [client] section.    :param conv:        Conversion dictionary to use instead of the default one.        This is used to provide custom marshalling and unmarshaling of types.        See converters.    :param use_unicode:        Whether or not to default to unicode strings.        This option defaults to true for Py3k.    :param client_flag: Custom flags to send to MySQL. Find potential values in constants.CLIENT.    :param cursorclass: Custom cursor class to use.    :param init_command: Initial SQL statement to run when connection is established.    :param connect_timeout: Timeout before throwing an exception when connecting.        (default: 10, min: 1, max: 31536000)    :param ssl:        A dict of arguments similar to mysql_ssl_set()'s parameters.        For now the capath and cipher arguments are not supported.    :param read_default_group: Group to read from in the configuration file.    :param compress: Not supported    :param named_pipe: Not supported    :param autocommit: Autocommit mode. None means use server default. (default: False)    :param local_infile: Boolean to enable the use of LOAD DATA LOCAL command. (default: False)    :param max_allowed_packet: Max size of packet sent to server in bytes. (default: 16MB)        Only used to limit size of "LOAD LOCAL INFILE" data packet smaller than default (16KB).    :param defer_connect: Don't explicitly connect on contruction - wait for connect call.        (default: False)    :param auth_plugin_map: A dict of plugin names to a class that processes that plugin.        The class will take the Connection object as the argument to the constructor.        The class needs an authenticate method taking an authentication packet as        an argument.  For the dialog plugin, a prompt(echo, prompt) method can be used        (if no authenticate method) for returning a string from the user. (experimental)    :param server_public_key: SHA256 authenticaiton plugin public key value. (default: None)    :param db: Alias for database. (for compatibility to MySQLdb)    :param passwd: Alias for password. (for compatibility to MySQLdb)    :param binary_prefix: Add _binary prefix on bytes and bytearray. (default: False)    See `Connection 
`_ in the specification. """ _sock = None _auth_plugin_name = '' _closed = False _secure = False def __init__(self, host=None, user=None, password="", database=None, port=0, unix_socket=None, charset='', sql_mode=None, read_default_file=None, conv=None, use_unicode=None, client_flag=0, cursorclass=Cursor, init_command=None, connect_timeout=10, ssl=None, read_default_group=None, compress=None, named_pipe=None, autocommit=False, db=None, passwd=None, local_infile=False, max_allowed_packet=16*1024*1024, defer_connect=False, auth_plugin_map=None, read_timeout=None, write_timeout=None, bind_address=None, binary_prefix=False, program_name=None, server_public_key=None):

pymsql.collections 设置超时时间。

利用工具获取bug堆栈

posted on
2018-12-20 11:29 阅读(
...) 评论(
...)

转载于:https://www.cnblogs.com/wenlin-gk/p/10148337.html

你可能感兴趣的文章
iptables
查看>>
消息中间件对比
查看>>
Python自学笔记之高级特性——生成器
查看>>
android通过shape.xml制作渐变背景
查看>>
分类(三):支持向量机SVM
查看>>
第4条 通过私有构造器强化不可实例化的能力
查看>>
微信分享 添加 代码
查看>>
nodejs
查看>>
Android ViewPager多页面滑动切换以及动画效果
查看>>
redis错误总结
查看>>
ecshop 批量删除购物车商品
查看>>
Hunting for Sensitive Data with the Veil-Framework
查看>>
mysql中now,curdate,curtime,sysdate区别
查看>>
初始化一个list集合
查看>>
js如何获取当前时间并对时间进行比较?
查看>>
MySql远程访问及防火墙设置
查看>>
XCode 已有项目添加 Git
查看>>
windows安装解压版mysql5.6以上
查看>>
位域,链接指示
查看>>
exchange 2013 相关日志查询
查看>>