總結(jié)下連接服務(wù)器后常使用到到操作,不常折騰服務(wù)器,一用起來(lái)就得查來(lái)查去栈顷,寫(xiě)下來(lái),方便以后查閱嵌巷;
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ù)庫(kù)
create database mySite default character set utf8mb4 collate utf8mb4_unicode_ci;
數(shù)據(jù)庫(kù)支持遠(yuǎn)程連接;
use mysql;
update user set host = '%' where user = 'root';
查看數(shù)據(jù)庫(kù)
SHOW DATABASES;
選擇數(shù)據(jù)庫(kù)
use mySite;
查看表
SHOW TABLES;
刪除數(shù)據(jù)搪哪;
DELETE FROM tb_name WHERE id=3;
退出
exit靡努;
node
forever start app.js #啟動(dòng)
forever stop app.js #暫停