總結(jié)下連接服務(wù)器后常使用到到操作,不常折騰服務(wù)器,一用起來就得查來查去,寫下來,方便以后查閱;
ssh登錄服務(wù)器
ssh -i *****.pem root@**.**.**.**
linux 傳輸文件
scp -I ~/.ssh/aaa.pem ./aa.text root@0.0.0.0:/home/
nginx 配置文件路徑:
/etc/nginx/nginx.conf
mysql
登錄
mysql -uroot -p
之后輸入密碼;
創(chuàng)建數(shù)據(jù)庫
create database mySite default character set utf8mb4 collate utf8mb4_unicode_ci;
數(shù)據(jù)庫支持遠程連接;
use mysql;
update user set host = '%' where user = 'root';
查看數(shù)據(jù)庫
SHOW DATABASES;
選擇數(shù)據(jù)庫
use mySite;
查看表
SHOW TABLES;
刪除數(shù)據(jù);
DELETE FROM tb_name WHERE id=3;
退出
exit;
node
forever start app.js #啟動
forever stop app.js #暫停