How to clear the MySQL screen opened through the MySQL Command Line Client on Windows XP

前端 未结 8 809
小鲜肉
小鲜肉 2020-12-28 11:34

How do i clear the MySQL screen, which I opened through the MySQL Command Line Client?

The operating system is Windows XP.

相关标签:
8条回答
  • 2020-12-28 11:59

    Whenever I need to work on my stuff, I use Windows PowerShell to drop into the mysql shell. The only way I've found to clear the screen is to

    1. Exit mysql
    2. Type cls at the powershell prompt
    3. Drop back into the mysql shell again

    It's a kind of workaround, but it works for me, I guess.

    0 讨论(0)
  • 2020-12-28 12:02

    Note: Please see @Pekka's answer for the Windows version, which seems to be that there is none for windows. However, this is a useful post to take a look at for windows. The remainder of this answer shows how you can do it in Unix / Linux and exists for historical significance as it has clearly been useful to some users.

    To clear the editor screen in Unix/Linux you can type:

    system clear
    

    This makes use of mysql's system command to call the shell's clear command.

    Note: the system command works only in Unix.

    0 讨论(0)
  • 2020-12-28 12:05

    You can clear the screen with:

    system cls
    

    Or alternatively

    \! cls
    
    0 讨论(0)
  • 2020-12-28 12:06

    I know this question is for Windows but since so many answers have been provided already I just thought to extend it for Linux users also so it will be beneficial for future users too.

    So in Linux you can do

    Ctrl + L

    to clear the MySQL command window running through terminal.:)

    0 讨论(0)
  • 2020-12-28 12:07
    \! clear
    

    Since 'clear' is a Linux operating system command and Linux and Mac OS X are both forms of Unix, this command might very well work fine for you too.

    Please note that the '! ' in front of the clear command is used to tell MySQL to pass the command back to the OS to handle.

    0 讨论(0)
  • 2020-12-28 12:07

    I done this workaround for Windows Right-click on the top frame of console -> Properties -> Layout -> and set Screen Buffer Size Height to large number.

    0 讨论(0)
提交回复
热议问题