TProcess + poUsePipes should do the job, but I don't think it's a good idea for mysql, there is a dedicated library for mysql (and you would know that). May be if you provided more details. Also there would be the whole headache of managing credentials (properly)