-bash-4.2$ mysql -u zabbix -p zabbix_proxy Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 902 Server version: 5.6.39 MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select dcheckid,druleid,type,key_ from dchecks where druleid in (select druleid from drules where name="DMZ"); +----------+---------+------+--------------+ | dcheckid | druleid | type | key_ | +----------+---------+------+--------------+ | 7 | 5 | 12 | | | 8 | 5 | 9 | system.uname | +----------+---------+------+--------------+ 2 rows in set (0.05 sec) mysql> select dserviceid,dhostid,status,dcheckid from dservices where dcheckid in (select dcheckid from dchecks where druleid in (select druleid from drules where name="DMZ")); Empty set (0.01 sec) mysql>