List:General Discussion« Previous MessageNext Message »
From:Brian Stanton Date:April 27 2005 9:12pm
Subject:RE: host info
View as plain text  
Along those lines, you could use "show variables like 'pid_file'" if the
user needing to know the hostname has privileges for this.  Thanks for the
idea!

Thanks,
Brian Stanton

-----Original Message-----
From: mfatene@stripped [mailto:mfatene@stripped] 
Sent: Wednesday, April 27, 2005 3:42 PM
To: Stanton, Brian
Cc: 'mysql@stripped'
Subject: RE: host info

Hi all,
Mysql server knows the OS server as localhost. the hostname you see in
status is
the OS server from which you connect (the client one), since it's defined in
the
 grant.

The only method i can see is : ls <datadir_path>/*.pid
its hostname.pid

You can do it also with *.err

Mathias


Selon "Stanton, Brian" <brian.stanton@stripped>:

> The 'Connection' output from the 'status' command is actually what I was
> looking for.  However, most likely it will be a jdbc connection to mysql,
> not the mysql client, so I'll have to see if it works that way or not.
>
> Thanks,
> Brian Stanton
>
> -----Original Message-----
> From: Eamon Daly [mailto:edaly@stripped]
> Sent: Wednesday, April 27, 2005 2:04 PM
> To: Stanton, Brian; mysql@stripped
> Subject: Re: host info
>
> I don't know if it's possible in MySQL.
>
> That said, in the mysql client, you can type '\s' for
> 'status'. Look for 'Current user' in the output.
>
> ____________________________________________________________
> Eamon Daly
>
>
>
> ----- Original Message -----
> From: "Stanton, Brian" <brian.stanton@stripped>
> To: <mysql@stripped>
> Sent: Wednesday, April 27, 2005 10:03 AM
> Subject: host info
>
>
> > Does anyone know a function that will return the hostname of the mysql
> > server you are connecting to?
> >
> >
> >
> > Just as:
> >
> > mysql> select database();
> >
> > returns the database you're connected to, I need to display the host I'm
> > connected to.
> >
> >
> >
> > Similar to the oracle statement: select host_name from v$instance;
> >
> >
> >
> > Thanks,
> >
> > Brian Stanton
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>

Thread
host infoBrian Stanton27 Apr
  • Re: host infoEamon Daly27 Apr
RE: host infoMikhail Berman27 Apr
RE: host infoBrian Stanton27 Apr
RE: host infoMikhail Berman27 Apr
RE: host infoBrian Stanton27 Apr
RE: host infoMikhail Berman27 Apr
RE: host infoBrian Stanton27 Apr
  • RE: host infomfatene27 Apr
  • Re: host infoEamon Daly28 Apr
RE: host infoBrian Stanton27 Apr
  • RE: host infomathias fatene28 Apr