Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

The operating system is Windows XP.

like image 434
mithun1538 Avatar asked Mar 25 '10 11:03

mithun1538


People also ask

How do I clear the MySQL command line client screen?

clear mysql> !\ cls mysql> system cls mysql> system clear ..

How do I clear the screen in MySQL 5.7 command line client?

Use '! reset' this will clear the terminal.

How do I clear MySQL windows?

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.

How do I terminate a MySQL 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.


2 Answers

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.

like image 164
Singamalai Avatar answered Sep 28 '22 01:09

Singamalai


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)

like image 40
Pekka Avatar answered Sep 28 '22 00:09

Pekka