Daily
防火墙开启http(80)和https(443)服务
1 | firewall-cmd --permanent --add-service=http |
问答
Nginx:curl ip时报403错误
可能出现原因:1.文件权限不足 2.索引不存在,index file 3.selinux策略限制
检查以上三个问题,全部确认就可以了
http的特点
- 默认端口80
- 明文传输
负载均衡的算法
- 轮询
- 加权轮询
- ip_hash
- url_hash
查询当前使用的是那个数据库
- select database();
怎么替换文件中的单个字符或者多个字符
- sed / tr
负载均衡中加权轮询怎么设置
- upstream aa {server ip weight=1}
忘记mysql密码,重置
- 停止mysql服务,systemctl stop mysqld
- 编辑/etc/my.cnf文件
1
2skip-grant-tables # 核心参数:跳过权限验证(登录无需密码)
skip-networking # 可选:禁止远程连接(临时提升安全性) - mysql 8+以上
1
2
3
4
5
6# 方式 1:修改密码(推荐,兼容默认认证方式)
alter user 'root'@'localhost' identified by '新密码';
# 方式 2:若报错 "Unknown column 'password' in 'field list'",用此命令
update user set authentication_string='' where user='root'; # 清空旧密码
将第二步配置文件中的那两行注释,再执行下面语句
alter user 'root'@'localhost' identified with mysql_native_password by '新密码';






