sh SSH和SCP LigthSail命令

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh SSH和SCP LigthSail命令相关的知识,希望对你有一定的参考价值。

INSERT INTO wp_users SELECT * FROM gaiapolewp.gp_users;
INSERT INTO wp_usermeta SELECT * FROM gaiapolewp.gp_usermeta;
DELETE FROM wp_terms;
INSERT INTO wp_terms SELECT * FROM gaiapolewp.gp_terms;
DELETE FROM wp_term_relationships;
INSERT INTO wp_term_relationships SELECT * FROM gaiapolewp.gp_term_relationships;
DELETE FROM wp_term_taxonomy;
INSERT INTO wp_term_taxonomy SELECT * FROM gaiapolewp.gp_term_taxonomy;
DELETE FROM wp_posts;
INSERT INTO wp_posts 
SELECT ID
  , post_author
  , post_date
  , post_date
  , post_content
  , post_title
  , post_excerpt
  , post_status
  , comment_status
  , ping_status
  , post_password
  , post_name
  , to_ping
  , pinged
  , post_modified
  , post_modified
  , post_content_filtered
  , post_parent
  , guid
  , menu_order
  , post_type
  , post_mime_type
  , comment_count
FROM gaiapolewp.gp_posts;
DELETE FROM wp_postmeta;
INSERT INTO wp_postmeta SELECT * FROM gaiapolewp.gp_postmeta;
DELETE FROM wp_comments;
INSERT INTO wp_comments SELECT * FROM gaiapolewp.gp_comments;
DELETE FROM wp_commentmeta;
INSERT INTO wp_commentmeta SELECT * FROM gaiapolewp.gp_commentmeta;
mysql -u root -p
mysql -p -u root gaiapolewp < gaiapolewp.sql
DROP DATABASE IF EXISTS gaiapolewp;
CREATE DATABASE gaiapolewp;
USE gaiapolewp;
SHOW TABLES;
SELECT DATE(post_date), COUNT(1) FROM gp_posts WHERE DATE(post_date) >= '2018-08-01' GROUP BY DATE
(post_date);
SELECT DATE_FORMAT(post_date, '%Y-%m'), COUNT(1) FROM gp_posts GROUP BY  DATE_FORMAT(post_date, '%
Y-%m');
ssh -N -L 8888:127.0.0.1:80 -i ~/.ssh/LightsailDefaultPrivateKey-us-east-1.pem bitnami@34.200.244.131 ;
firefox http://127.0.0.1:8888/phpmyadmin ;
# Change the permission of .pem certificate so only the root user can read it 
chmod 400 LightsailDefaultPrivateKey-us-east-1.pem ;
cp LightsailDefaultPrivateKey-us-east-1.pem ~/.ssh ;
# Connect to LigthSail via SSH
ssh -i ~/.ssh/LightsailDefaultPrivateKey-us-east-1.pem bitnami@34.200.244.131 ;
# Send file LightSail via SCP
scp -i ~/.ssh/LightsailDefaultPrivateKey-us-east-1.pem backup-9.5.2018_09-40-41_gaiapole.tar.gz  bitnami@34.200.244.131:~ ;

以上是关于sh SSH和SCP LigthSail命令的主要内容,如果未能解决你的问题,请参考以下文章

sh 使用SCP通过SSH复制文件

sh scp复制(从)到ssh服务器

sh SSH Copy o scp。来自:http://www.hypexr.org/linux_scp_help.php

sh SSH Copy o scp。来自:http://www.hypexr.org/linux_scp_help.php

Linux中,使用SSH过程中,sh-copy-id命令报错:-bash: ssh-copy-id: command not found

ssh服务及scp命令相关知识