当前位置:网站首页>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)
- 焱融看 | 混合云时代下,如何制定多云策略
- el-table的render-header用法
- GSE104154_ scRNA-seq_ fibrotic MC_ bleomycin/normalized AM3
- MySQL connection query and subquery
- GB/T-2423. XX environmental test documents, including the latest documents
- KL divergence is a valuable article
- 表单自定义校验规则
- Aaaaaaaaaaaa
- Grpc quick practice
猜你喜欢

Screenshot literacy tool download and use
![寻找重复数[抽象二分/快慢指针/二进制枚举]](/img/9b/3c001c3b86ca3f8622daa7f7687cdb.png)
寻找重复数[抽象二分/快慢指针/二进制枚举]

Learn PWN from CTF wiki - ret2shellcode

Baohong industry | four basic knowledge necessary for personal finance

ThreadLocal详解

Verilog 过程连续赋值

2022-2028 global soft capsule manufacturing machine industry research and trend analysis report

Discrimination between sap Hana, s/4hana and SAP BTP
![[HCIA continuous update] working principle of OSPF Protocol](/img/bc/4eeb091c511fd563fb1e00c8c8881a.jpg)
[HCIA continuous update] working principle of OSPF Protocol

West digital decided to raise the price of flash memory products immediately after the factory was polluted by materials
随机推荐
Generate random numbers that obey normal distribution
终日乾乾,夕惕若厉
2022-2028 global deep sea generator controller industry research and trend analysis report
Detailed explanation of ThreadLocal
Tupu software has passed CMMI5 certification| High authority and high-level certification in the international software field
spark调优
uniapp 使用canvas 生成海报并保存到本地
Baohong industry | four basic knowledge necessary for personal finance
Possible causes of runtime error
4. Find the median of two positive arrays
Verilog 时序控制
3048. Number of words
Intersection of Venn graph
[HCIA continuous update] overview of dynamic routing protocol
Go execute shell command
ThreadLocal详解
小米青年工程师,本来只是去打个酱油
Named block Verilog
2022-2028 global manual dental cleaning equipment industry research and trend analysis report
Unit · elementary C # learning notes