MySQL – How to Disable HTML Output in Console

linuxMySQL

I've used several mysql instances on many servers, but this one had a suprise for me tonight when I tried to use its console for the first time :

me@MYSERVER:~$ mysql -H my_base (....)
(...) 
Server version: 5.5.37-0ubuntu0.12.10.1 (Ubuntu)
(...)

mysql> show tables;
<TABLE BORDER=1><TR><TH>Tables_in_crocowords</TH></TR><TR><TD>T_BEST_LEVEL</TD></TR><TR><TD>T_CONNECTED</TD></TR><TR><TD>T_CONTEST</TD></TR><TR><TD>T_MONEY</TD></TR><TR><TD>T_MONEY_CREDIT</TD></TR><TR><TD>T_MONEY_DEBIT</TD></TR><TR><TD>T_PARTICIPATION</TD></TR><TR><TD>T_PERFECT</TD></TR><TR><TD>T_PLAYER</TD></TR><TR><TD>T_RANK</TD></TR><TR><TD>T_REPLAY</TD></TR><TR><TD>T_REPLAY_DATA</TD></TR><TR><TD>T_REPLAY_LEVEL</TD></TR></TABLE>13 rows in set (0.00 sec)

mysql> select * from T_BEST_LEVEL LIMIT 3;
<TABLE BORDER=1><TR><TH>fid_contest</TH><TH>best_level</TH><TH>best_level_score</TH></TR><TR><TD>72</TD><TD>1</TD><TD>13</TD></TR><TR><TD>73</TD><TD>1</TD><TD>60</TD></TR><TR><TD>73</TD><TD>2</TD><TD>44</TD></TR></TABLE>3 rows in set (0.00 sec)

All outputs are in HTML format !

I've tried to look and browse the documentations about this, but couldn't figure how to remove this html output.

Can you help me ?

:~$ mysql --version
mysql  Ver 14.14 Distrib 5.5.37, for debian-linux-gnu (i686) using readline 6.2

Best Answer

You told it to generate html.

$ mysql -H my_base

The -H option is an alias for the --html option.

I assume you were thinking of -h ... which is the shortcut for --host.

http://dev.mysql.com/doc/refman/5.5/en/mysql-command-options.html#option_mysql_html

Related Question