How do i clear the MySQL screen, which I opened through the MySQL Command Line Client?
The operating system is Windows XP.
clear mysql> !\ cls mysql> system cls mysql> system clear ..
Use '! reset' this will clear the terminal.
To clear the console, you need to add the \! symbol before the clear command. Alternatively, you can also use the CTRL + L command to clear the screen. If you're accessing MySQL from the Command Prompt in Windows OS, then you need to replace the clear command with the cls command.
Commands are terminated by a semi-colon (;). If a command is not terminated by a semi-colon, pressing enter simply continues the current command on the following line. To exit from mysql type quit at the mysql> command-prompt.
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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With