12 2021 档案

摘要:python pymysql re requests socket库的简单运用 要考试了,这里用所学的知识做一个实例 pymysql库 这个库是用来连接数据库的,使用数据库语句在python里创建表和数据库 English.py import pymysql def init(): #创建数据库和表 阅读全文
posted @ 2021-12-28 10:48 supermao12 阅读(170) 评论(0) 推荐(0) 编辑
摘要:vsftpd nfs autofs samba firewalld selinux lvm 的试验过程 vsftpd 服务端 yum -y install vsftpd echo 'anon_root=/' >> /etc/vsftpd/vsftpd.conf firewall-cmd --perm 阅读全文
posted @ 2021-12-23 17:31 supermao12 阅读(112) 评论(0) 推荐(0) 编辑
摘要:linux 博客系统 基于LNMP安装博客系统 Linux nginx mysql php 先将lnmp和wordpress上传至虚拟机 下载unzip解压两个软件 yum -y install unzip unzip lnmp.zip unzip wordpress-4.7.3-zh_CN.zip 阅读全文
posted @ 2021-12-16 17:18 supermao12 阅读(77) 评论(0) 推荐(0) 编辑
摘要:## 主从数据库 主数据库的内容同步传输到附属数据库 客户访问附属数据库 这样做保证了数据库的稳定性 需要两台虚拟机 **两边个虚拟机都要操作** 配置hosts文件 进入/etc/hosts追加输入 192.168.200.30 mysql1 192.168.200.40 mysql2 可以通过p 阅读全文
posted @ 2021-12-14 18:35 supermao12 阅读(93) 评论(0) 推荐(0) 编辑
摘要:python与数据库的例子 初始化数据库 链接数据库创建库和表并插入数据 init.py import pymysql sql_base='create database school;' sql_table='''create table student(sno varchar(20) prima 阅读全文
posted @ 2021-12-14 15:36 supermao12 阅读(515) 评论(0) 推荐(0) 编辑
摘要:文件 文件是否存在 test -f 判断文件是否存在 test -d 目录是否存在 test -e 文件名是否存在 通过echo $? 来得知test后的结果 test -f sh && echo yes || echo no 关于 &&符号 等前面的式子成功后再来执行后面的句子 成功为 0 失败为 阅读全文
posted @ 2021-12-01 17:38 supermao12 阅读(300) 评论(0) 推荐(0) 编辑
摘要:这是一个使用python连接mysql的例子 涉及到类的使用 import pymysql import function as f def mysql(): db=pymysql.connect(host='localhost',user='root',password='1234',charse 阅读全文
posted @ 2021-12-01 11:05 supermao12 阅读(961) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示