sudo apt update
sudo apt search mysql-server
sudo apt install -y mysql-server
sudo systemctl start mysql
mysql --version
sudo mysql -uroot -p
alter user 'root'@'localhost' identified with mysql_native_password by '密码';
flush privileges;
sudo mysql -uroot -p
# 登录mysql,执行source .sql文件
# 新建用户
CREATE USER 'username'@'remote_ip' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'remote_ip' WITH GRANT OPTION;
FLUSH PRIVILEGES;
SELECT user,plugin,host FROM mysql.user;
地址
https://nginx.org/en/linux_packages.html#Ubuntu
https://nodejs.org/zh-cn/download
export NVM_SOURCE=https://gitee.com/mirrors/nvm.git
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
ssh-keygen -t ed25519 -C "your_email@example.com"
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -h
swapon --show
sudo swapoff /swapfile
2. 删除旧文件
sudo rm /swapfile
3. 创建新大小的 swap 文件
sudo fallocate -l 4G /swapfile # 例如改为 4G
4. 重新设置
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile