Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL commands history

When using mysql through command line (with default shipped configuration), I was able to get my commands history using up-arrow.
Bu after modifying the server configuration for a remote access and successfully authenticated to, I'm not able to view any command and it feels annoying thinking that I lost all my commands history.

Is there some location where mysql stores previously used commands?

BR.

like image 724
tmarwen Avatar asked Feb 03 '14 09:02

tmarwen


People also ask

How can I see MySQL command history?

Get History of All MySQL Commands in a File Copy SET GLOBAL log_output = 'file'; SET GLOBAL general_log_file = "/yourPath/logfile. log"; SET GLOBAL general_log = 'on'; Now, locate the file at the specified path and open it to see all the details.

Does MySQL have history?

On Unix, mysql writes the statements to a history file. By default, this file is named . mysql_history in your home directory.


1 Answers

On Unix, the mysql client logs statements executed interactively to a history file. By default, this file is named .mysql_history in your home directory.

Please read out MySQL Documentation.

like image 64
Abdul Manaf Avatar answered Oct 15 '22 23:10

Abdul Manaf