简体   繁体   中英

How can I found out the database ip location on network only with query? (mysql)

How can I found out the database ip location on network only with query? (mysql) I can debug with the query inside web application only.(add code of query that show db location inside executed function)

(I don't know with which db I working - on my computer or with db on other local network computer.)

ip on my computer for example : 10.0.0.07 and on other computer that also has same db 10.0.0.09

Thanks, Yosef

mysql> SELECT @@hostname;
+-----------------------+
| @@hostname            |
+-----------------------+
| localhost.localdomain | 
+-----------------------+
1 row in set (0.00 sec)

mysql> SHOW GLOBAL VARIABLES LIKE 'hostname';
+---------------+-----------------------+
| Variable_name | Value                 |
+---------------+-----------------------+
| hostname      | localhost.localdomain | 
+---------------+-----------------------+
1 row in set (0.00 sec)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM