Transferring code from SQL Editor to MySQL Instance in Ubuntu 16.04 VM

The title covers just about everything. I am new to SQL and want to create a setup with MySQL running in a VM (already created, no tables, no population in it at all) and a Java desktop program running on a separate physical machine to make requests to the DB. I have not created anything yet but want to understand the process of writing the SQL code and getting it into the DB for when requests are made.

Am I thinking about this the right way? I'm not really sure about that to begin with.

Yes so far it is good what you have planned. Will this vm be accessed from other people in same network using the java client application? How will they install this client tool?
The way I personally deploy sql code is I write , for example, one file per each table (or sql artifact) and deploy it to the target server using powershell.
Each file is named sequentially

By the way this is a microsoft sql server forum.