2

Being used to Linux I typed clear into MySQL CLI and expected the screen to clear - it did not. But it didn't produce a syntax error or any other kind of notice.

I decided to type any random word into it

MariaDB [db_name] > trey;

This produced:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'trey' at line 1

Which I kind of expected, but now it's making me worried that clear is doing something behind-the-scenes.

When I searched the webs for MySQL clear man, nothing came up. I'm not specifically asking how to clear the screen as I found SO posts detailing how-to, but what does clear do? And why doesn't it produce a syntax error?

Shadow
  • 33,525
  • 10
  • 51
  • 64
treyBake
  • 6,440
  • 6
  • 26
  • 57
  • 1
    `clear (\c) Clear the current input statement.`- from https://dev.mysql.com/doc/refman/8.0/en/mysql-commands.html – Jonnix Aug 28 '19 at 14:20
  • @Jonnix tis the answer, primarily this bit: `If mysql is invoked with the --binary-mode option, all mysql commands are disabled except charset and delimiter` – treyBake Aug 28 '19 at 14:25

0 Answers0