scp -P 22 root@172.17.41.212:/root/databak.sql.gz /root
172.17.41.212 (服务器A 的内网ip) 如果公网ip 可以使用,则直接使用公网ip
(执行命令后需要输入服务器A 的 ssh 密码)
-P 参数是端口号
/root 是本机器路径(例如服务器B)
设置 mysql 开机启动 (centos)
systemctl enable mysqld
Sequelize报错:
Unhandled rejection SequelizeConnectionError: Client does not support authentication protocol requested by server; consider upgrading MySQL client
mysql -uroot -p
ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘12345678’
ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
注意我的root,host是'%'
你可能执行的是:(123 改成你自己的密码)
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123';
改成:
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123';