当前位置:网站首页>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()
边栏推荐
- /silicosis/geo/GSE184854_scRNA-seq_mouse_lung_ccr2/GSE184854_RAW/GSM5598265_matrix_inflection_demult
- Find duplicates [Abstract binary / fast and slow pointer / binary enumeration]
- [JS reverse series] analysis of a customs publicity platform
- Knowing things by learning | self supervised learning helps improve the effect of content risk control
- 终日乾乾,夕惕若厉
- 跟着CTF-wiki学pwn——ret2shellcode
- Go执行shell命令
- 寻找重复数[抽象二分/快慢指针/二进制枚举]
- 竞争与冒险 毛刺
- Verilog 时序控制
猜你喜欢

Tupu software has passed CMMI5 certification| High authority and high-level certification in the international software field

C shallow copy and deep copy
![[C Advanced] brother Peng takes you to play with strings and memory functions](/img/95/ab1bb0b3fa0b99e32233a5ca5d42a4.jpg)
[C Advanced] brother Peng takes you to play with strings and memory functions

浅谈线程池相关配置

命名块 verilog
![[JVM] detailed description of the process of creating objects](/img/6e/0803b6b63c48337985faae8d5cbe1a.png)
[JVM] detailed description of the process of creating objects

Learn PWN from CTF wiki - ret2shellcode

GB/T-2423.xx 环境试验文件,整理包括了最新的文件里面

halcon图像矫正

Knowing things by learning | self supervised learning helps improve the effect of content risk control
随机推荐
PMP personal sprint preparation experience
Knowing things by learning | self supervised learning helps improve the effect of content risk control
Grpc快速实践
[HCIA continuous update] working principle of OSPF Protocol
Global and Chinese markets for hand hygiene monitoring systems 2022-2028: Research Report on technology, participants, trends, market size and share
2022-2028 global manual dental cleaning equipment industry research and trend analysis report
venn圖取交集
halcon图像矫正
< job search> process and signal
2022 hoisting machinery command examination paper and summary of hoisting machinery command examination
JS introduction < 1 >
Principle of computer composition - interview questions for postgraduate entrance examination (review outline, key points and reference)
Verilog 线型wire 种类
3048. Number of words
Mathematical calculation in real mode addressing
Competition and adventure burr
tarjan2
Global and Chinese market of gynaecological health training manikin 2022-2028: Research Report on technology, participants, trends, market size and share
Apple added the first iPad with lightning interface to the list of retro products
JDBC details