摘要: 1.新增数据库表: 2.给表中增加数据: 3.查询数据: Python查询Mysql使用 fetchone() 方法获取单条数据, 使用fetchall() 方法获取多条数据。 fetchone(): 该方法获取下一个查询结果集。结果集是一个对象 fetchall():接收全部的返回结果行. row 阅读全文
posted @ 2018-11-07 09:50 jaysonzxk 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 1 import pymysql 2 3 4 5 # 打开数据库连接(ip/端口/数据库用户名/登录密码/数据库名/编码) 6 7 db = pymysql.connect(host="localhost",port=3306,user="root", password="root",db= "test",charset='utf8') 8 9 # 使用 curso... 阅读全文
posted @ 2018-11-07 09:13 jaysonzxk 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Python连接MySql数据库 连接数据库前,请先确认以下事项: 1、 在你的机子上已经安装了 Python PyMySQL 模块。 2、您已经创建了数据库 test 3、连接数据库test使用的用户名为 root,密码为 root,你可以可以自己设定或者直接使用root用户名及其密码。 阅读全文
posted @ 2018-11-07 09:12 jaysonzxk 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 操作数据库是程序员常用的技能之一,mysql数据库是中小型项目的首选,Python 标准数据库接口为 Python DB-API,Python DB-API为开发人员提供了数据库应用编程接口,Python 数据库接口支持非常多的数据库, 不同的数据库你需要下载不同的DB API模块,例如你需要访问O 阅读全文
posted @ 2018-11-07 09:11 jaysonzxk 阅读(146) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-11-06 13:34 jaysonzxk 阅读(8) 评论(0) 推荐(0) 编辑
摘要: from common import cof import random import string from common.HTTPservice import MyHttpservice # def get_url(Route): # host = cof.get_host() # route = Route # url = "".join([host,route]... 阅读全文
posted @ 2018-11-06 13:29 jaysonzxk 阅读(609) 评论(0) 推荐(0) 编辑
摘要: 1 import requests 2 from common.logger import Log 3 from common import cof 4 from common import base 5 6 7 class MyHttpservice(object): 8 9 def __init__(self): 10 self.url = c... 阅读全文
posted @ 2018-11-06 13:28 jaysonzxk 阅读(1554) 评论(0) 推荐(0) 编辑
摘要: CentOS6.5安装Jenkins过程及配置 1.添加jenkins源 wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo rpm --import http://pkg.jenki 阅读全文
posted @ 2018-10-26 08:58 jaysonzxk 阅读(827) 评论(0) 推荐(0) 编辑
摘要: Centos6 安装python3一:1.下载安装包:wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz2.解压xz -d Python-3.6.5.tar.xz tar xvf Python-3.6.5.tar 3.配置 阅读全文
posted @ 2018-10-26 08:58 jaysonzxk 阅读(410) 评论(0) 推荐(0) 编辑
摘要: 一安装mysql1.rpm -qa | grep mysql // 这个命令就会查看该操作系统上是否已经安装了mysql数据库2.rpm -e --nodeps mysql // 强力删除模式,如果使用上面命令删除时,提示有依赖的其它文件,则用该命令可以对其进行强力删除3.yum list | gr 阅读全文
posted @ 2018-10-26 08:57 jaysonzxk 阅读(93) 评论(0) 推荐(0) 编辑