Call mysql with -N (option -N --skip-column-names ):
mysql -N ... use testdb; select * from names; +
Credit ErichBSchulz to indicate the alias -N.
To remove the grid (vertical and horizontal lines) around the results, use -s ( --silent ). Columns are separated by the TAB symbol.
mysql -s ... use testdb; select * from names; id name 1 pete 2 john 3 mike
To output data without headers and without a grid, use both -s and -N .
mysql -sN ...
suspectus Jan 02 '14 at 16:17 2014-01-02 16:17
source share