当前位置:网站首页>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()
边栏推荐
- Calculation of page table size of level 2, level 3 and level 4 in protection mode (4k=4*2^10)
- Qualcomm platform wifi-- WPA_ supplicant issue
- Verilog wire type
- C reflection practice
- Go执行shell命令
- aaaaaaaaaaaaa
- Go execute shell command
- halcon图像矫正
- 2022-2028 global manual dental cleaning equipment industry research and trend analysis report
- 3048. Number of words
猜你喜欢

ThreadLocal详解

Detailed explanation of ThreadLocal
![[HCIA continuous update] overview of dynamic routing protocol](/img/03/83c883afb63b7c63f6879b5513bac3.jpg)
[HCIA continuous update] overview of dynamic routing protocol

QT environment generates dump to solve abnormal crash

Verilog state machine

Form custom verification rules

Use usedeferredvalue for asynchronous rendering
![[JS reverse series] analysis of a customs publicity platform](/img/15/fdff7047e789d4e7c3c273a2f714f3.jpg)
[JS reverse series] analysis of a customs publicity platform

How to establish its own NFT market platform in 2022

Verilog 避免 Latch
随机推荐
Rotating frame target detection mmrotate v0.3.1 learning model
Use blocking or non blocking for streamline
小米青年工程师,本来只是去打个酱油
Apple added the first iPad with lightning interface to the list of retro products
Spark Tuning
In depth interpretation of pytest official documents (26) customized pytest assertion error information
Global and Chinese markets for welding equipment and consumables 2022-2028: Research Report on technology, participants, trends, market size and share
Continuous assignment of Verilog procedure
Learn PWN from CTF wiki - ret2shellcode
Merge interval, linked list, array
Qualcomm platform WiFi -- P2P issue (2)
Global and Chinese market of bone adhesives 2022-2028: Research Report on technology, participants, trends, market size and share
Redis set command line operation (intersection, union and difference, random reading, etc.)
aaaaaaaaaaaaa
What is the binding path of SAP ui5
Detailed explanation of the difference between Verilog process assignment
[golang] leetcode intermediate bracket generation & Full Permutation
2022-2028 global manual dental cleaning equipment industry research and trend analysis report
IPhone 6 plus is listed in Apple's "retro products" list
汇率的查询接口