
MySQL
The program needs to be designed to do that. If it is, then it will either be designed to use a TCP connection (e.g. on port 3306) to the database or a named socket (e.g.
MySQL.sock). All you'll really need to do is start the database engine, create the necessary databases, grant rights to whatever database user the program calls into the DB as, pre-populate any necessary tables/data the program expects to be there, and then start the program. The program documentation should tell you what you need to provide as far as a
MySQL environment and give any necessary SQL initialization scripts.