Remote Upload .sql to Synology DSM

Steps

  1. Connect to source phpmyadmin
  2. Download .sql
  3. Edit .sql as necessary
  4. Login to Synology DSM
  5. Upload edited .sql
  6. Enable SSH
  7. Check DSM global ip inside DSM external access
  8. Login to  destination phpmyadmin and drop the database to be replaced
  9. Remote login to router
  10. Enable port forward for synology SSH port
  11. Putty to DSM using global ip via port enabled in the router
  12. Transfer .sql to database using  /mariadb路径/mysql -uroot -ppassword my_db < /volume1/文件路径/文件.sql