一、環境準備Ubuntu 20.04.2 LST系統主機一臺
1、解鎖root用戶(雲伺服器默認使用root用戶不需要解鎖)
2、切換到root用戶
二、安裝Mysql
https://dev.mysql.com/downloads/repo/apt/點擊Download
1、下載Mysql APT 配置包
# wget 上一步複製的地址wget https:
2、安裝Mysql APT 配置包
dpkg -i mysql-apt-config_0.8.17-1_all.deb彈出選擇框時選擇OK
3、更新apt 軟體源
4、安裝Mysql Server
apt-get install mysql-server安裝過程中有下列彈窗注意設置
設置Mysql root 用戶密碼
設置Mysql root 用戶密碼(確認密碼)
選擇身份驗證方式、密碼加密方式
包升級期間不詢問重啟服務 選擇no
為GNU libc更新 選擇yes
三、查看Mysql狀態
service mysql statusservice mysql startservice mysql stopservice mysql restart四、連接Mysql
五、卸載方式
sudo apt purge mysql-*sudo rm -rf /etc/mysql/ /var/lib/mysqlsudo apt autoremovesudo apt autoclean附FRP內網穿透
環境準備(公網IP伺服器一臺 本文使用Ubuntu系統)
一、下載FRP
https://github.com/fatedier/frp/releases選擇對應的系統版本
本文使用linux_amd64版本
使用FTP工具上傳到伺服器
解壓縮
tar -zxvf frp_0.37.0_linux_amd64.tar.gz服務端
cd frp_0.37.0_linux_amd64/vim frps.ini [common]bind_addr = 0.0.0.0bind_port = 8000kcp_bind_port = 8000dashboard_port = 8001dashboard_user = admindashboard_pwd = 123456vhost_http_port = 7075log_file = ./frps.loglog_level = infolog_max_days = 3token = 123456max_pool_count=50tcp_mux = truenohup ./frps -c ./frps.ini &客戶端
cd frp_0.37.0_linux_amd64/vim frpc.ini [common]server_addr = 39.103.193.55 server_port =8000 token = 123456 log_level = infolog_max_days = 7dashboard_user = admin dashboard_pwd = 123456 [ssh]type = tcplocal_ip = 127.0.0.1local_port = 22 remote_port = 3386 [mysql]type = tcplocal_ip = 127.0.0.1local_port = 3306 remote_port = 3036 [oracle]type = tcplocal_ip = 192.168.127.10 local_port = 1521 remote_port = 1551nohup ./frpc -c ./frpc.ini &訪問伺服器ip加埠
http://公網ip:控制臺埠