I was very much confused when I have tried to clear the screen of MySQL and I didn’t got any result.
root@nilnandan-Satellite-A200:~# mysql -uroot -p
Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.
mysql> show databases;
| Database |
| information_schema |
| mysql |
2 rows in set (0.28 sec)
I thought, clear command will work same in MySQL which it works for Windows or Linux OS. But no..In MySQL this command is doing something different.
When I checked through help command, I found following thing.
clear (c) Clear the current input statement.
I don’t know how and what it clears but after goggling a lot I found following commands to clear the screen in MySQL. I guess this is not the actual command but workaround. Btw: Its using system (OS) command in MySQL.
On Linux, we can use below command:
mysql>! clear (here, there is a space between ! and clear)