当前位置:网站首页>PY3 link MySQL
PY3 link MySQL
2022-07-02 03:21:00 【Little wooden man】
# -*- coding: UTF-8 -*-
import pymysql
# Open database connection
db = pymysql.connect(host='192.168.1.6',
user='root',
passwd='admin',
port=3307,
database='hxjxequities')
# Use cursor() Method to create a cursor object cursor
cursor = db.cursor()
# Use execute() Method execution SQL Inquire about
cursor.execute(" SELECT VERSION() ")
# Use fetchone() Method to get a single piece of data .
data = cursor.fetchone()
print("mysqldb version : %s " % data)
# Close database connection
db.close()
边栏推荐
猜你喜欢

【JVM】创建对象的流程详解

verilog 并行块实现

Cache processing scheme in high concurrency scenario

Comment élaborer une stratégie nuageuse à l'ère des nuages mixtes

Learn PWN from CTF wiki - ret2shellcode

This article describes the step-by-step process of starting the NFT platform project

GB/T-2423.xx 环境试验文件,整理包括了最新的文件里面
On redis (II) -- cluster version

Common means of modeling: aggregation

Verilog parallel block implementation
随机推荐
Verilog 过程连续赋值
halcon图像矫正
C # joint halcon out of halcon Environment and various Error Reporting and Resolution Experiences
On redis (II) -- cluster version
Global and Chinese markets for welding equipment and consumables 2022-2028: Research Report on technology, participants, trends, market size and share
2022 hoisting machinery command examination paper and summary of hoisting machinery command examination
Find duplicates [Abstract binary / fast and slow pointer / binary enumeration]
知物由学 | 自监督学习助力内容风控效果提升
Mathematical calculation in real mode addressing
Verilog wire type
Verilog 时序控制
Named block Verilog
命名块 verilog
Global and Chinese markets for ultrasonic probe disinfection systems 2022-2028: Research Report on technology, participants, trends, market size and share
Force deduction daily question 540 A single element in an ordered array
Global and Chinese markets for infant care equipment, 2022-2028: Research Report on technology, participants, trends, market size and share
只需简单几步 - 开始玩耍微信小程序
流线线使用阻塞还是非阻塞
Verilog 状态机
Verilog reg register, vector, integer, real, time register