I am unable to clear the screen of the mysql command line client like I know in case of java it is 'cls'.


There is a number of solutions in Linux like this one, but the consensus seems to be there is none for Windows. See e.g. here or here (scroll to the bottom)


Are you using a Unix client? Try Ctrl + L. Might even work on Windows too ...


In Unix or Linux you can use the:

system clear

Also you may try to use Ctrl + L in linux

However if you are using Windows then I think it is not possible. You may refer to this bug which is reported for the same for windows.

The only best think I can think of is you can only Exit MySql, Type CLS and then re-enter MySql.

  • @Supriyo:- You are using windows or linux? – Rahul Tripathi Nov 22 '13 at 19:54
  • :-no, it's on windows – Supriyo Nov 22 '13 at 19:56
  • @Supriyo:- Then I dont think it is possible. I have just updated my answer with the bug which is reported for the same – Rahul Tripathi Nov 22 '13 at 19:57
  • Then there is no way to clear it? @rahul – Supriyo Nov 22 '13 at 20:04
  • @Supriyo:- In windows there is no way. But I have added an alternative in my answer. But that is just a work around. But it cant be done in windows for sure. This is a bug which has been reported to MYSQL team. Does that answer your question? – Rahul Tripathi Nov 22 '13 at 20:06

Try \! cls; worked for me on Win 10, MySQL Command Line Client 8.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.