Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

CLS for MySQL

Posted on 2010-01-12
9
Medium Priority
?
1,328 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
  • 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
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
Course of the Month13 days, 21 hours left to enroll

580 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