如何在 Windows 中清除 mysql 屏幕控制台?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8807836/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 22:18:38  来源:igfitidea点击:

How to clear mysql screen console in windows?

mysqlwindowscommand-linesqlcommand

提问by Leo Lerdorf

The title is my question. I googled and try something like

标题是我的问题。我用谷歌搜索并尝试类似的东西

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

blah blah ...

but none of them works. anyone show me how to clear screen, just like clscommand in window

但它们都不起作用。任何人都可以告诉我如何清除屏幕,就像cls窗口中的命令一样

采纳答案by dogbane

This is not possible on Windows.

这在 Windows 上是不可能的。

There is an open bug for this issue: Bug #58680: Windows Clear Screen Command

此问题有一个未解决的错误:错误 #58680:Windows 清除屏幕命令

回答by Leo Lerdorf

EDIT:
I don't think Any of the commands will work. In linux Ctrl-L will do the job. in windows there is no equivalent. You can only Exit MySql, Type CLSand then re-enter MySql.

编辑:
我认为任何命令都不起作用。在 linux 中 Ctrl-L 将完成这项工作。在 Windows 中没有等价物。您只能退出MySql,键入CLS然后重新进入MySql。

回答by Milind Morey

mysql> 
root@xion:~# mysql -uroot -ppassword;
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 33291
Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> \! clear

回答by jafaritaqi

Just scroll down with your mouse

只需用鼠标向下滚动

In Linux Ctrl+Lwill do but if your scroll up you will see the old commands

在 Linux Ctrl+ 中L可以,但如果向上滚动,您将看到旧命令

So I would suggest scrolling down in windows using mouse

所以我建议使用鼠标在窗口中向下滚动

回答by Niket Thada

On linux : you can use ctrl + Lor type command system clear.

在 linux 上:您可以使用ctrl + L或键入 command system clear

回答by dzoneuser

I had the same issue, and CTRL+Lworked for me on Windows 10.

我遇到了同样的问题,CTRL+L在 Windows 10 上为我工作。

回答by kunal doidya

although there is bug for clearing the screen in MySQL, I have found one tactic trick whatever you want to say...

尽管在 MySQL 中存在清除屏幕的错误,但无论您想说什么,我都找到了一种策略……

you can easily clear the screen using this...

您可以使用此轻松清除屏幕...

just press ( ctrl + down arrow ) until you reach to top... happy codding...

只需按( ctrl + 向下箭头 )直到到达顶部......快乐编码......

回答by CHAITTNYA SHINDE

mysql console can cleared out on windows by using shortcut key

可以使用快捷键在 Windows 上清除 mysql 控制台

CTRL + L

CTRL + L

回答by edrianhadinata

you can type the following step:

您可以键入以下步骤:

mysql> exit;

mysql> 退出;

C:\xampp\mysql\bin> cls

C:\xampp\mysql\bin> cls

C:\xampp\mysql\bin> mysql -u root -h localhost

C:\xampp\mysql\bin> mysql -u root -h localhost

it's work!

这是工作!

回答by Akash

I handle it as follows:

我是这样处理的:

  1. Right click on cmd open property's goto layout
  2. Set screen buffer height to 9999 and ok
  3. Now whenever you want to type a new query, just scroll with the mouse and you will get a blank screen
  1. 右键单击 cmd 打开属性的 goto 布局
  2. 将屏幕缓冲区高度设置为 9999 即可
  3. 现在无论何时你想输入一个新的查询,只需用鼠标滚动,你就会得到一个空白屏幕