- 博客(4)
- 收藏
- 关注
原创 mysql
安装mysql pip install pymysql mysql版本:mysql-installer-community-8.0.12.0 基本命令 创建数据库 create database student; 使用数据库 use student; 显示所有表 show tables; import pymysql #1、创建数据库连接对象 connect = pymysql.connect( host:表示主机地址 127.0.0.1 本机ip 172.16.21.41 局域网ip localhost
2020-08-19 09:38:03
140
转载 pymysql
昨天在李哥帮忙检验我学习效果的时候 我使用pymysql出现了以下的错误 1 python-module ‘pymysql’ has no attribute ‘connect’ 一出错 我本能的想去看下是不是我没连接成功 然后 pip3 install pymysql 不要起import的包名作为文件名啊!!! 因此,我总结了下pymysql的基本使用 一、PyMySQL介绍 PyMySQL是在 Python3.x 版本中用于连接 MySQL 服务器的一个库,Python2中是使用mysqldb。 PyM
2020-08-19 09:36:09
243
原创 python读取文本
1,循环文件内的目录 def file_load(dir, Filelist): # 读取数据文件路径名字 # new_dir = dir if os.path.isfile(dir): Filelist.append(dir) elif os.path.isdir(dir): for s in os.listdir(dir): l = [] l.appen
2020-08-17 14:12:13
153
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅