Mysql sql history(cross session)
am 09.03.2006 04:59:29 von chau_fai
Hi,
I have found many docs to see is there any way to figure out how can
mysql store the typed words or sql(whatever it is a valid sql or not)
so that we can just use "arrow up" or "arrow down"
easily to move to the previous sql or even some sqls typed yesterday or
in different sessions(such as by putty/konsole) that is already logged
out ?
Does anyone have any clues about this ? I think that it should be done
by setting some
mysql server vairables but i didn't see any mentioned in the mysql
docs.
Thanks,
Anson
Re: Mysql sql history(cross session)
am 09.03.2006 19:52:06 von Bill Karwin
wrote in message
news:1141876769.650624.191970@z34g2000cwc.googlegroups.com.. .
> I have found many docs to see is there any way to figure out how can
> mysql store the typed words or sql(whatever it is a valid sql or not)
> so that we can just use "arrow up" or "arrow down"
> easily to move to the previous sql or even some sqls typed yesterday or
> in different sessions(such as by putty/konsole) that is already logged
> out ?
If you use UNIX or Linux, the commands are stored in a file called
".mysql_history" in your home directory. You can also specify the location
of the file. Some usage of the mysql tool alters the history storage. Read
the docs for more information:
http://dev.mysql.com/doc/refman/5.0/en/mysql-command-options .html
The docs do not indicate how history storage is done if you use a Windows
client.
Regards,
Bill K.