MySQL5.7.28 二进制安装

  • 基于Centos7.6

1.清理MariaBD环境(MariaDB与MySQL可能会有冲突)

rpm -qa |grep mariadb

Read More

MariaDB 10.5.8 二进制安装

  • 基于Ubuntu20.04.01

1.路径规划与创建

数据文件存储位置 /data/mysql/data
日志文件存储位置 /data/logs/mysql
binlog文件存储位置 /data/mysql
缓存目录位置 /dta/tmp

Read More

Docker容器与宿主机同网段且可通信

  • 基于Ubuntu20.04.01

1.创建docker macvlan虚拟网卡

假设宿主机网段为192.168.3.x网段,基础镜像为ubuntu20.04。

Read More

修改已运行Docker容器的端口映射关系

1.停止docker服务

1
systemctl stop docker

Read More

Ubuntu20.04虚拟机双网卡双IP配置

1.在虚拟机配置中添加网卡

2.系统中配置IP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
root@ubuntu20041-server:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 100
0 link/ether 00:0c:29:06:52:fc brd ff:ff:ff:ff:ff:ff
inet 192.168.3.189/24 brd 192.168.3.255 scope global ens33
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe06:52fc/64 scope link
valid_lft forever preferred_lft forever
3: ens38: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:0c:29:06:52:06 brd ff:ff:ff:ff:ff:ff
#此时ens38状态是down

#添加ens38固定IP地址
vim /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
ens33:
addresses: [192.168.3.189/24]
dhcp4: no
optional: true
gateway4: 192.168.3.1
nameservers:
addresses: [192.168.3.1,114.114.114.114]
ens38:
addresses: [192.168.3.199/24]
dhcp4: no
optional: true
gateway4: 192.168.3.1
nameservers:
addresses: [192.168.3.1,114.114.114.114]
version: 2
renderer: networkd

Read More

Python关于pyc

1. Python是一门解释型语言?

我初学Python时,听到的关于Python的第一句话就是,Python是一门解释性语言,我就这样一直相信下去,直到发现了*.pyc文件的存在。如果是解释型语言,那么生成的*.pyc文件是什么呢?c应该是compiled的缩写才对啊!

Read More

Python字符编码

python解释器在加载 .py 文件中的代码时,会对内容进行编码(默认ascill)

ASCII(American Standard Code for Information Interchange,美国标准信息交换代码)是基于拉丁字母的一套电脑编码系统,主要用于显示现代英语和其他西欧语言,其最多只能用 8 位来表示(一个字节),即:2**8 = 256-1,所以,ASCII码最多只能表示 255 个符号。

Read More

Python变量

Variables are used to store information to be referenced and manipulated in a computer program. They also provide a way of labeling data with a descriptive name, so our programs can be understood more clearly by the reader and ourselves. It is helpful to think of variables as containers that hold information. Their sole purpose is to label and store data in memory. This data can then be used throughout your program.

Read More

Python开发环境搭建

1.安装python解释器

1
2
3
https://www.python.org/ 选择适合的操作系统版本下载安装即可
windows平台安装时注意勾选Add Python 3.9 to PATH 添加到环境变量中
安装完成后在命令提示符界面输入python显示版本及安装完成

Read More

Oracle--11G基础-查看数据库状态

1
2
3
4
5
6
SQL> select instance_name,status,database_status from v$instance;

INSTANCE_NAME STATUS DATABASE_STATUS
---------------- ------------ -----------------
orcl OPEN ACTIVE

Read More