Yes, the command you're looking for is
reset
In contrast to clear
, or Ctrl+L, reset
will actually completely re-initialise the terminal, instead of just clearing the screen. However, it won't re-instantiate the shell (bash). That means that bash's state is the same as before, just as if you were merely clearing the screen.
As @Ponkadoodle mentions in the comments, this command should do the same thing more quickly:
tput reset
From the other answers:
You can set a Keyboard Shortcut to reset
the terminal, as explained by towolf.
If you're running Kubuntu, and your terminal is Konsole, you need to go to Edit → Clear history, since reset
doesn't work the same way there, as UncleZeiv notes.
This log just indicates that you didn't shut down correctly, so upon startup, InnoDB had to do a "crash recovery". It's not the crash recovery that would have lost data -- it's your operating system or hardware. Crash recovery is designed actually to avoid losing data due to crashes (that's its entire purpose).
The log message indicates a severe problem:
The log sequence numbers 5988825 and 5988825 in ibdata files do not match the log sequence number 6057379 in the ib_logfiles!
This likely means that data is not getting to disk effectively either because of a misconfiguration in MySQL, or a misconfiguration of your operating system or hardware.
If you are running with innodb_flush_log_at_trx_commit
set to anything other than 1
, this is your fault as this is a dangerous setting. If you are running it with 1
, this would imply that InnoDB is requesting data to be written to disk and confirmed, but the system is lying to InnoDB about writing it, causing corruption later.
There is no way to get the data back. If you need data that was lost, you must restore it from backup.
MyISAM is definitely not safer, and in fact MyISAM would more than likely have suffered extreme corruption under the same circumstances.
Best Answer
That's all about journaling. Write is performed in three stages. First all changes are written along with the old data, then all references are relinked to the new values and if that two stages are passed ok then the whole transaction is marked as commited, all old links are purged and journal entry is removed. If engine at start find some uncommited transactions in the journal then all related changes are rolled back to the initial state.