How can I clear the screen in the MySQL console?

MysqlCommand Line

Mysql Problem Overview


I am not able to clear the screen in the MySQL command line prompt. My screen is filled with tables, data and queries. How can I clear it up?

Mysql Solutions


Solution 1 - Mysql

Ctrl+L

will do it - it's a shell command, but it works well in the MySQL console.

Solution 2 - Mysql

Another possibility is to issue a system command.

For Linux:

mysql> system clear;

For Windows (I'd guess. For Linux I'm sure though):

mysql> system cls;

Solution 3 - Mysql

Try your terminal application's screen clear. There is no such thing as a command to clean the MySQL shell.

On a Mac, you can go to menu EditClear Screen or use the keyboard shortcut + Cmd + L.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNavneet Nandan JhaView Question on Stackoverflow
Solution 1 - MysqlexussumView Answer on Stackoverflow
Solution 2 - MysqlfancyPantsView Answer on Stackoverflow
Solution 3 - MysqltanaydinView Answer on Stackoverflow