How to clear mysql screen console in windows?

2019-02-05 12:20发布

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 cls command in window

13条回答
该账号已被封号
2楼-- · 2019-02-05 12:22

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
查看更多
Animai°情兽
3楼-- · 2019-02-05 12:22

Open Properties by clicking the upper left console window icon, go to Layout tab, take note of the value set in Screen Buffer Size->Height, and change it to 1. Click OK.
You'll see a 1 row console. Open Properties again and change that value back to what it had before. Resize the console down and you'll have a clean console.

enter image description here

查看更多
SAY GOODBYE
4楼-- · 2019-02-05 12:22

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

you can easily clear the screen using this...

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

查看更多
Deceive 欺骗
5楼-- · 2019-02-05 12:30

Just scroll down with your mouse

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

So I would suggest scrolling down in windows using mouse

查看更多
手持菜刀,她持情操
6楼-- · 2019-02-05 12:30

Well, if you installed MySql Server e.g. Version 5.5. which has it's folder located in:

C:\Program Files\MySQL\MySQL Server 5.5\bin

The best way would be to include it in your paths.

  • First run sysdm.cpl applet from run i.e. WinKey + R

  • Navigate to Advanced -> Environment Variables

  • Select PATH and Click Edit.

  • Scroll to the end of the text, and add ";C:\Program Files\MySQL\MySQL Server 5.5\bin" without quotes (Notice the semicolon starting the text, this should only be added if it's not already there),

Now you can just call:

start /b /wait mysql -u root -p

via command prompt.

To clear the screen now, you can just exit in mysql & call cls

Kinda trickish hack but does the job.

If you're using WAMP or other tool, it's even easier!

Open command prompt and type:

C:\wamp\mysql\bin\mysql -u root -p

Enter as normal, then whenever you want to clear screen, do:

exit or quit

And then clear using DOS:

cls

You can easily re-enter by pressing up twice to get your mysql call command

查看更多
再贱就再见
7楼-- · 2019-02-05 12:30

SQL> clear scr

This command clears the screen in MYSQL

查看更多
登录 后发表回答