I\'m new to using Heroku and I have a Ruby/Sinatra app in which I plan on using a MySQL database as the main data store.
However, I do not want to write results dir
I wrote a short article
https://medium.com/@michaeltendossemwanga/import-mysql-database-to-heroku-with-one-command-import-db-sql-a932d720c82b
Here is a batch script to fasten the process https://gist.github.com/MichaelTendoSsemwanga/f013963092e3abcce801834871d14b03
Save this batch script as import.bat
@echo off
heroku config | findstr CLEARDB > config.txt
set /p url=> config.txt
set "x=%string:@=" & set "substring=%"
set "host=%substring:/=" & set "x=%"
echo Host: %host%
echo Host: %host% >> config.txt
set "x=%string::=" & set "substring=%"
set "password=%substring:@=" & set "x=%"
echo Password: %password%
echo Password: %password% >> config.txt
set "x=%string:://=" & set "substring=%"
set "user=%substring::=" & set "x=%"
echo User: %user%
echo User: %user% >> config.txt
mysql -u %user% -p%password% -h %host% -D %dbname% < %1
In the heroku app directory, run
import db.sql
Command line output