I want to create a batch file to start MySQL server (mysqld
) and Rails Thin server (rails s thin
). But only MySQL starts, rails s thin
doesn't:
@ECHO OFF
cd C:\path\to\app
CMD /C "mysqld --console"
REM exit <-- with or without it
REM cd C:\path\to\app <-- with or without it
CMD /C "rails s thin"
I also tried to create three files for this. The main one runs other two. Doesn't help either, only MySQL runs. And I need to start MySQL before Rails. Rails needs running MySQL. How to write such a batch?
UPD: How to start 2 programs simultaniously in windows command prompt