笔记
MySQL无法远程连接
修改配置文件/etc/mysql/mysql.conf.d/mysqld.cnf,将bind-address = 127.0.0.1注释掉
备份数据库
mysqldump -u root -p [DATABASE_NAME] > ./[DATABASE_NAME].sql恢复数据库
方法一
进入对应的数据库
use [DATABASE_NAME];恢复数据库
source /var/bak/[DATABASE_NAME].sql;方法二
直接在bash界面下操作
mysql -u root -p [DATABASE_NAME] < ./[DATABASE_NAME].sqlHTTPS配置
安装
apt install -y certbot python3-certbot-nginx部署
certbot --nginx -d domain.com -d www.domain.com返回如下信息即成功:Successfully received certificate.Certificate is saved at: /etc/letsencrypt/live/domain.com/fullchain.pemKey is saved at: /etc/letsencrypt/live/domain.com/privkey.pemThis certificate expires on 2024-09-08.These files will be updated when the certificate renews.Certbot has set up a scheduled task to automatically renew this certificate in the background.Deploying certificateSuccessfully deployed certificate for domain.com to /etc/nginx/conf.d/domain.confSuccessfully deployed certificate for www.domain.com to /etc/nginx/conf.d/domain.confCongratulations! You have successfully enabled HTTPS on https://domain.com and https://www.domain.com
压缩与解压
压缩tar.gz
tar -zcvf archive.tar.gz directory解压tar.gz
tar -zxvf example.tar.gz