So it is looking for the βmy_config.hβ file and does find it on the system in /usr/include/mysql.
Using the command : apt-file search my_config.h
I get the following results: libdar-dev: /usr/include/dar/libdar_my_config.h libmariadb-client-lgpl-dev: /usr/include/mariadb/my_config.h libmysqlclient-dev: /usr/include/mysql/my_config.h
The system that reports does have the libmysqlclient-dev package, but the others do not. According to my SME, this is not required for MySQL, so it should not be using this as the identifier
I am trying to determine which is the correct file to use, so I am hoping someone here in the community can assist.
The file_read variable gets the content of the Version.xml file returned by the ReadFile operand.
The expression that should be searched in the specific file content is used as a filter.
The filtered file_read variable is compared with an empty string using the βnot equal" (βne") relation which indicates that the product will be detected (IS_INSTALLED varaible set to true) only if the expression is found.
The condition listed at the end ensures exiting the signature once the
product was not found.
Also did a dump of the dpkg for mysql from 2 systems that should both report that 5.7 is installed.
System reporting MySQL installed
dpkg-query -l βmysqlβ | grep ii
ii libdbd-mysql-perl 4.028-2+deb8u2 amd64 Perl5 database interface to the MySQL database
ii libmysqlclient-dev 5.7.19-1debian8 amd64 MySQL development headers
ii libmysqlclient18:amd64 5.5.58-0+deb8u1 amd64 MySQL database client library
ii libmysqlclient20:amd64 5.7.19-1debian8 amd64 MySQL shared client libraries
ii libmysqld-dev 5.7.19-1debian8 amd64 MySQL embedded server library
ii mysql-apt-config 0.8.1-1 all Auto configuration for MySQL APT Repo.
ii mysql-client 5.7.19-1debian8 amd64 MySQL Client meta package depending on latest version
ii mysql-common 5.7.19-1debian8 amd64 MySQL Common
ii mysql-community-client 5.7.19-1debian8 amd64 MySQL Client
ii mysql-community-server 5.7.19-1debian8 amd64 MySQL Server
ii mysql-server 5.7.19-1debian8 amd64 MySQL Server meta package depending on latest version
ii php5-mysqlnd 5.6.30+dfsg-0+deb8u1 amd64 MySQL module for php5 (Native Driver)
System reporting MySQL is not installed
dpkg-query -l βmysqlβ | grep ii
ii libdbd-mysql-perl 4.028-2+deb8u2 amd64 Perl5 database interface to the MySQL database
ii libmysqlclient18:amd64 5.5.58-0+deb8u1 amd64 MySQL database client library
ii mysql-apt-config 0.8.8-1 all Auto configuration for MySQL APT Repo.
ii mysql-client 5.7.20-1debian8 amd64 MySQL Client meta package depending on latest version
ii mysql-common 5.7.20-1debian8 amd64 MySQL Common
ii mysql-community-client 5.7.20-1debian8 amd64 MySQL Client
ii mysql-community-server 5.7.20-1debian8 amd64 MySQL Server
ii mysql-server 5.7.20-1debian8 amd64 MySQL Server meta package depending on latest version
ii mysqltcl 3.052-1 amd64 interface to the MySQL database for the Tcl language