zoukankan      html  css  js  c++  java
  • mysql python image

    连接mysql数据库:
    cnx = mysql.connector.connect(user='joe', database='test')

            Connector/Python参数列表

    Argument NameDefaultDescription
    user (username*)   The user name used to authenticate with the MySQL server.
    password (passwd*)   The password to authenticate the user with the MySQL server.
    database (db*)   The database name to use when connecting with the MySQL server.
    host 127.0.0.1 The host name or IP address of the MySQL server.
    port 3306 The TCP/IP port of the MySQL server. Must be an integer.
    unix_socket   The location of the Unix socket file.
    use_unicode True Whether to use Unicode.
    charset utf8 Which MySQL character set to use.
    collation utf8_general_ci Which MySQL collation to use.
    autocommit False Whether to autocommit transactions.
    time_zone   Set the time_zone session variable at connection time.
    sql_mode   Set the sql_mode session variable at connection time.
    get_warnings False Whether to fetch warnings.
    raise_on_warnings False Whether to raise an exception on warnings.
    connection_timeout(connect_timeout*)   Timeout for the TCP and Unix socket connections.
    client_flags   MySQL client flags.
    buffered False Whether cursor objects fetch the results immediately after executing queries.
    raw False Whether MySQL results are returned as is, rather than converted to Python types.
    ssl_ca   File containing the SSL certificate authority.
    ssl_cert   File containing the SSL certificate file.
    ssl_key   File containing the SSL key.
    ssl_verify_cert False When set to True, checks the server certificate against the certificate file specified by the ssl_ca option. Any mismatch causes a ValueError exception.
    force_ipv6 False When set to True, uses IPv6 when an address resolves to both IPv4 and IPv6. By default, IPv4 is used in such cases.
    dsn   Not supported (raises NotSupportedError when used).
  • 相关阅读:
    51Nod 1267 4个数和为0 二分
    51Nod 1090 3个数和为0 set 二分优化
    51Nod 1001 数组中和等于K的数对 Set
    Codeforces 890C
    Codeforces 890B
    Codeforces 890A
    51nod 1058 N的阶乘的长度 位数公式
    C#调用本机摄像头
    读取、写入excel数据
    数据库笔记--基本应用
  • 原文地址:https://www.cnblogs.com/bigbigtree/p/3243192.html
Copyright © 2011-2022 走看看