View Single Post

   
  #3 (permalink)  
Old 02-28-2008, 08:14 AM
Peter H. Coffin
 
Posts: n/a
Default Re: Clear MySQL History - Remotely

On 23 Sep 2006 08:31:32 -0700, mdavila78 wrote:
> Hi there,
>
> I was wondering if it's possible to Clear MySQL's History Remotely.
>
> Considering that you only have root access to the database but no
> access to the linux box.
>
> I found something in Goggle to do this, but you need to have access to
> the linux box:
>
> cat /dev/null > ~/.mysql_history
>
> How can you do this remotely with only root access to the database and
> not to the linux box?


The .mysql_history file is on the machine that runs the client, not the
server. So, if you're running the client on your machine and connecting
to a remote database server, you should look on YOUR machine for the
history file. A machine which, I hope, you should have access to. If
you're making an insane kind of telnet connection to a CLI on another
machine to (from there) issue a connect to reach the database, you're
out of luck. (I cannot rightly understand *why* someone would set a
sytem up that way, but it's possible. If that's the case, I recommend
finding a different provider -- you'll share history with every other
user of the same CLI. Well, I suppose you could try setting your pager
to "cat /dev/null > ~/.mysql_history" and run "SELECT 'FOO'", then set
pager back to something else, but...)

--
_ o
|/)
Reply With Quote