run mysql and return query in command line