The title is my question. I googled and try something like
mysql> !\\ clear
mysql> !\\ cls
mysql> system cls
mysql> system clear
blah blah ...
mysql>
root@xion:~# mysql -uroot -ppassword;
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 33291
Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> \! clear
On linux : you can use ctrl + L or type command system clear
.
The bug on Windows which most people are talking is probably fixed. Ctrl + L is works for clearing the screen on Windows 10 [Mysql 8]
I had the same issue, and CTRL+L worked for me on Windows 10.
Fixed in 8.0.19.
Previously, the system (!) command for the mysql command-line client worked only for Unix and Unix-like systems. It now works on Windows as well. For example, system cls or ! cls may be used to clear the screen.
Well, if you installed MySql Server e.g. Version 5.5. which has it's folder located in:
C:\Program Files\MySQL\MySQL Server 5.5\bin
The best way would be to include it in your paths.
First run sysdm.cpl
applet from run
i.e. WinKey + R
Navigate to Advanced -> Environment Variables
Select PATH and Click Edit.
Now you can just call:
start /b /wait mysql -u root -p
via command prompt.
To clear the screen now, you can just exit
in mysql & call cls
Kinda trickish hack but does the job.
If you're using WAMP or other tool, it's even easier!
Open command prompt and type:
C:\wamp\mysql\bin\mysql -u root -p
Enter as normal, then whenever you want to clear screen, do:
exit or quit
And then clear using DOS:
cls
You can easily re-enter by pressing up twice to get your mysql call command