Executing MySQL query on linux shell

To run the query and get a clean output e.g. a single column without any text/graphics around it,

mysql -e “select INET_NTOA(ip_start) from ip_group_city where region_name=’Indiana'” -sN ipaddresses

Leave a Reply

Your email address will not be published. Required fields are marked *