|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Getting host!
I am trying to figure out how to get the host name/ip through a query. Well what it is, the place I have my database at has the php My Admin on it. What do I need to put in the query box in order to see the host name/ip address?
|
|
#2
|
||||
|
||||
|
RE: Getting host!
1. Do you want to see the hostname of the server OR
2. The hostname of the user who will interact with DB ?. If you just want to see the hostname of the server, then you should run a php script that display the IP of the server. If what you mean is the 2nd, then you had to make a field to save the IP of user, then just select that field on the query box. |
|
#3
|
|||
|
|||
|
RE: Getting host!
Yes I want to see the hostname of the server. I need it for the mysql_connect(HOST...)
I did use show user(), and used the ip after the @, but it didn't work. |
|
#4
|
||||
|
||||
|
RE: Getting host!
Well, if mysql is in the same server with php then you can use localhost as the hostname of the machine.
mysql_connect("localhost", "username", "password"); If it's on different server then you might to ask your mysql administrator, coz the hostname is putted on the separate table, it's on the db: mysql, table: host. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Getting host! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|