上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 61 下一页

mysql清理binlog日志的方法

摘要: MySQL中的binlog日志记录了数据库中数据的变动,便于对数据的基于时间点和基于位置的恢复,但是binlog也会日渐增大,占用很大的磁盘空间,因此,要对binlog使用正确安全的方法清理掉一部分没用的日志。 [方法一]手动清理binlog 清理前的准备: 1.查看主库和从库正在使用的binlog 阅读全文
posted @ 2024-11-11 09:10 数据派 阅读(1481) 评论(0) 推荐(0)

python 文件读写(追加、覆盖)

摘要: 阅读全文
posted @ 2024-11-07 08:57 数据派 阅读(35) 评论(0) 推荐(0)

python判断列表为空的三种方法

摘要: python中判断列表为空判断列表为空是一个非常基础的问题。但是也有很多写法。 方法1:len() list = [] if len(list) == 0: print('list is empty') 方法2:直接使用if判断 list = [] if not list: print('list 阅读全文
posted @ 2024-11-04 09:04 数据派 阅读(1367) 评论(0) 推荐(0)

psql 常用快捷命令

摘要: \l 显示所有数据库 \c 切换当前数据库,相当于 mysql 的 use 命令 \d 显示数据库中有哪些表 \d tb_name 显示表 tb_name 的定义 \d+ 显示更详细的信息 \dt 只显示表 \di 只显示索引 \ds 只显示序列 \dv 只显示视图 \du 或者 \dg 显示所有角 阅读全文
posted @ 2024-10-28 09:13 数据派 阅读(51) 评论(0) 推荐(0)

解决PyCharm提示Error: Please select a valid Python interpreter

摘要: 前言 Pycharm运行Python3.7.8的程序时发现源程序运行报错(非语法错误) Error:please select a valid Python interpreter 解决 第一步:打开设置File -> Settings 第二步:选择Project ->Python Interpre 阅读全文
posted @ 2024-10-21 09:16 数据派 阅读(2424) 评论(0) 推荐(0)

python ImportError: libGL.so.1: cannot open shared object file: No such file or directory

摘要: 前言 python 报错python ImportError: libGL.so.1: cannot open shared object file: No such file or directory 这个错误通常表示你的 Python 程序需要使用 OpenGL 库,但是该库未安装或未正确配置。 阅读全文
posted @ 2024-10-17 09:02 数据派 阅读(3563) 评论(0) 推荐(1)

shell 读取文件的每一行内容并输出

摘要: 假设读取的文件为当期目录下的 test.txt 文件,内容如下: Google Runoob Taobao 实例 1 #!/bin/bash while read line do echo $line done < test.txt 执行输出结果为: Google Runoob Taobao 实例 阅读全文
posted @ 2024-10-11 08:24 数据派 阅读(270) 评论(0) 推荐(0)

mysql 连接失败:message from server: "Host 'xx.xxx' is not allowed to connect to this MySQL server"

摘要: 前言 mysql 连接失败:message from server: "Host '192.168.xx.xxx' is not allowed to connect to this MySQL server" 解决 错误信息表明你尝试从 IP 地址 192.168.xx.xxx 连接到 MySQL 阅读全文
posted @ 2024-10-05 11:19 数据派 阅读(694) 评论(0) 推荐(0)

查看虚拟机centos 7 的 IP 地址和命令

摘要: 用于生产环境下 安装CENTOS7 太费时间, 研究阶段 放在虚拟机里面 是最好的选择: 但是安装完毕后 就出现问题 无法使用IFCONFIG ; 毕竟 内核不一样 首先我们登录操作系统 用户名root 密码 123456 然后我们输入ip查询命名 ip addr 也可以输入 ifconfig查看i 阅读全文
posted @ 2024-10-04 10:34 数据派 阅读(1065) 评论(0) 推荐(0)

Docker容器Centos不能使用systemctl命令问题

摘要: 最近使用Docker搭建Centos容器时遇到这样的问题:Centos系统的不能使用systemctl命令! 具体场景使用 systemctl 或 service 命令重启服务时。 systemctl restart snmpd.service 会报无权限的错误: Failed to get D-B 阅读全文
posted @ 2024-10-03 11:38 数据派 阅读(1074) 评论(0) 推荐(0)
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 61 下一页