Had a situation where a connection to a MySQL 5.5 database appeared to work, but no results were returned. Started with the steps in the tech article below. In step 5, this connection URL did not work: mysql://hostname:3306/<database name>
What worked was using the IPv6 format, like this:
mysql://address=(protocol=tcp)(host=<IP_Address>)(port=<Your_Port#>)/Your_Database_Name
1. Obtain the JDBC driver (platform independent zip archive of Connector/J from http://dev.mysql.com/downloads/connector/j/)
2. Place the file in the jdbc lib directory of the Discover server in Vontu\Protect\lib\jdbc
3. Modify the permissions on jdbc driver so that the Protect user has full r/w/x
4. Add the following entry in the sqldatabasecrawler.properties file via the following
- On the Discover box go to the vontu/protect/config directory
- Make a backup copy of sqldatabasecrawler.properties
- Add/Edit the following for MySQL
# mysql
driver_jar.mysql = <file name of the jar file such as mysql-connector-java-5.1.21-bin.jar>
driver_class.mysql = com.mysql.jdbc.Driver
driver_subprotocol.mysql = mysql
driver_table_query.mysql = show tables
driver_row_selector.mysql = SELECT {1} FROM {0} LIMIT {2}
quote_table_names.mysql = false
5. Add the credentials to the scan target and use the following syntax for the connection string:
mysql://hostname or
mysql://hostname:3306/<database name>
6. Run the scan against the created scan target