fixing mine-sql for optional port