?
Solved

CLS for MySQL

Posted on 2010-01-12
9
Medium Priority
?
1,296 Views
Last Modified: 2012-05-08
When using the command prompt, a CLS command can be used the clears out the screen buffer. I have begun using the MySQL Command Line Client and unable to sue this command. Does anyone know the MySQL Command Line Client equivalent to CLS?
0
Comment
Question by:computerstreber
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 14

Expert Comment

by:Monis Monther
ID: 26301760
press the Ctrl + L
0
 
LVL 6

Expert Comment

by:magedroshdy
ID: 26301842
\c will do the trick
0
 
LVL 6

Expert Comment

by:magedroshdy
ID: 26301860
List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
?         (\?) Synonym for `help'.
clear     (\c) Clear command.
connect   (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as
               new delimiter.
edit      (\e) Edit command with $EDITOR.
ego       (\G) Send command to mysql server, display result vertically.
exit      (\q) Exit mysql. Same as quit.
go        (\g) Send command to mysql server.
help      (\h) Display this help.
nopager   (\n) Disable pager, print to stdout.
notee     (\t) Don't write into outfile.
pager     (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print     (\p) Print current command.
prompt    (\R) Change your mysql prompt.
quit      (\q) Quit mysql.
rehash    (\#) Rebuild completion hash.
source    (\.) Execute an SQL script file. Takes a file name as an argument.
status    (\s) Get status information from the server.
system    (\!) Execute a system shell command.
tee       (\T) Set outfile [to_outfile]. Append everything into given
               outfile.
use       (\u) Use another database. Takes database name as argument.
charset   (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
warnings  (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 6

Expert Comment

by:magedroshdy
ID: 26302463
Each command has both a long and short form. The long form is not case sensitive; the short form is. The long form can be followed by an optional semicolon terminator, but the short form should not.
0
 
LVL 3

Author Comment

by:computerstreber
ID: 26305608
I have tried to use CTRL + L, \c, and \! clear, but the screen does not clear out. Please see screen shot.
not-cleared.bmp
0
 
LVL 6

Expert Comment

by:magedroshdy
ID: 26307681
it is
\c (then enter key)
or
clear; (then enter key)
it is written in the 5th line in your screen shot
0
 
LVL 3

Author Comment

by:computerstreber
ID: 26308165
I tried that, but it does clear out the rest of the screen. It will clear out the line, but that is about it.
0
 
LVL 6

Accepted Solution

by:
magedroshdy earned 1000 total points
ID: 26341152
\! CLS
if you're working under windows box

and
\! clear
if you're working under unix - linux box

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
 
LVL 3

Author Comment

by:computerstreber
ID: 26342223
I am using a MySQL instance on a Windows machine. It seems as the the only way I can do it is if I were to sign off mysql, type CLS, and then resignon to mysql.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question