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:30

Click with contextMenu button on Mysql prompt and choose "Scroll", because I didn't find any way to clean too. =P

查看更多
闹够了就滚
3楼-- · 2019-02-05 12:33
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
查看更多
太酷不给撩
4楼-- · 2019-02-05 12:33

you can type the following step:

mysql> exit;

C:\xampp\mysql\bin> cls

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

it's work!

查看更多
我命由我不由天
5楼-- · 2019-02-05 12:35

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 CLS and then re-enter MySql.

查看更多
beautiful°
6楼-- · 2019-02-05 12:40

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

查看更多
孤傲高冷的网名
7楼-- · 2019-02-05 12:41

This is what I did to get around this bug. The windows console (cmd) is just not worth using for anything other than some simple commands. So the following is what I did.

Installed Cygwin (Go here) It is pretty straight forward to install. You can watch this video. It explains very easily how to install cygwin. Make sure when you select the packages that you want to install includes Mintt (it is basically a better shell or cmd) and mysql client package.

Once you are done installing it, you should add the bin folder from cygwin in your PATH Environmental Variables(The above video explains that as well)

Now You will have an icon on the desktop for cygwin. Open it up and login to mysql using the normal commands. You will need to put the ip of the mysql server in the command to make it work. I use the following logging in MySQL which was installed through wamp

mysql -u root -p -h 127.0.0.1 

You can add more arguments in there if you want. Once you get in mysql just press ctrl + L and you will clear the screen.

查看更多
登录 后发表回答