Unable to use -experimentalDb flag with mysql

175 views
Skip to first unread message

Vikrant Chauhan

unread,
Nov 19, 2020, 5:22:37 AM11/19/20
to OWASP ZAP User Group

I am trying to configure ZAP to use mysql (MariaDB flavor). Got the database setup with the schema and updated db.properties. Now when I run `$ zap.sh -experimentalDb`,  I am getting `java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/zaproxy ` error.


I am using Fedora 33 and tried installing mysql-connector-java and pasting the jar files in lib directory with no success.

Please help.

Antonio AE

unread,
Dec 23, 2020, 2:04:25 AM12/23/20
to OWASP ZAP User Group
Hi Vikrant,

  I have the same problem. I have done different tests but it seems it is no way to run ZAP with MySQL, did you finally get any success on this? If yes, could you, please, explain me how to got it?

  Regards,


    Antonio

Simon Bennetts

unread,
Dec 23, 2020, 4:19:14 AM12/23/20
to OWASP ZAP User Group
I must admit that I've not tried this in a long time :/
Hve you seen this article? It might help: https://mmiedaner.github.io/setting-up-zap-with-mysql/

Cheers,

Simon

Antonio AE

unread,
Dec 23, 2020, 5:43:47 AM12/23/20
to OWASP ZAP User Group
Hi Simon,

  Yes, I have been following the steps of that artice but with no success. I have tried with Mysql, with MariaDB, with different versions of Java and the connectors and I don't know what can I do more. Do you know if there is a combination of database_version - java_version - database_connector which is the recommended?
 
  Thanks and regards,
 
 
    Antonio

thc...@gmail.com

unread,
Dec 23, 2020, 6:36:07 AM12/23/20
to zaprox...@googlegroups.com
ZAP no longer loads arbitrary libs from the lib directory (required
changes for Java 11), only the ones that it was built with.

You need to specify where the connector is with the JVM option [1] (or
edit the start script), something like:
-cp /path/to/my/connector.jar

(Not tested.)


[1] https://www.zaproxy.org/docs/desktop/ui/dialogs/options/jvm/

Best regards.

Antonio AE

unread,
Dec 23, 2020, 8:50:42 AM12/23/20
to OWASP ZAP User Group
Hi thc202,

  Thank you very much for the information. I have done some tests but I still get the same error. I will continue doing more tests and share the results with all of you.

  Regards,


   Antonio

Vikrant Chauhan

unread,
Dec 29, 2020, 1:43:28 PM12/29/20
to OWASP ZAP User Group
Oh I thought this thread was ignored. I couldn't get any help, So I moved on to capturing my traffic using moloch aka arkime which integrates with elasticsearch. It runs as a daemon in the background and exports data to pcap file and provides a useful html frontend as well as a RESTful API. While I have it installed, all the data was quite overwhelming, so using it is still on my to do list. For now, I am maintaining my recon data in notion manually.

On another note, I think REST API provided by OWASP ZAP Proxy is good enough too. Now that I think of using MySQL database, it would be an overkill IMO. Moloch is less memory consuming and gives more detail on the traffic captured. If you still need the data in MySQL, you can always bridge the HSQLDB to your MySQL database using some exporting script or simply use HSQLDB directly in your code using ODBC/JDBC.

Antonio AE

unread,
Jan 11, 2021, 10:15:34 AM1/11/21
to OWASP ZAP User Group
Hello, happy New Year,

  I'm sorry because I have had to attend other topics in my company and I have not been able to answer sooner. I have to uninstall MariaDB and reinstall MySQL just to do a last test, but if not, I will choose the "standard way for data storage": if connexion to database can't be stablished in an easy way, probably the maintenance/performance/update will be hard too and database is something interesting but not mandatory. I will notice all of you if I have any progress on this.

  Thanks and regards,


     Antonio

Antonio AE

unread,
Jan 13, 2021, 3:56:02 AM1/13/21
to OWASP ZAP User Group
Hello, good morning,

  I have been doing more tests combining different versions of the JVM and the MySQL connectors and I still get the same error: "not found suitable driver", so by the moment, I think I'm going to stop this topic (with the hope I will be able to find a solution or an easy alternative). Thank you very much to all of you for your comments and support!!!!

  Best regards,


     Antonio

Heeraj Nair

unread,
Jul 7, 2023, 1:08:56 AM7/7/23
to OWASP ZAP User Group
Any update on this thread ? I am facing the same issue 

psiinon

unread,
Jul 7, 2023, 3:43:09 AM7/7/23
to zaprox...@googlegroups.com
No, I'm not aware of anyone working on this right now.
Volunteers very welcome :)

--
You received this message because you are subscribed to the Google Groups "OWASP ZAP User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zaproxy-users/aa40ea8d-75f7-4411-968b-85fedf4dd849n%40googlegroups.com.


--
OWASP ZAP Project leader
Reply all
Reply to author
Forward
0 new messages