usnistgov / MUD-PD

A tool for characterizing the network behavior of IoT Devices. The primary intended use is to assist in the generation of allowlist files formatted according to the Manufacturer Usage Description specification.
Other
22 stars 14 forks source link

Errors Connecting to MySQL database #15

Open bsmojoman opened 1 year ago

bsmojoman commented 1 year ago

I'm getting errors from the tool connecting to the MySQL database. This is connected to the current open issue regarding installation.

  1. Running MUD-PD on Ubuntu 22.04
  2. I'm running mysql for the database and followed the install instructions.
  3. I can remote app connect to the database with MySQL Workbench.

I'm running the latest clone from May 11, 2023.

When attempting to connect to the database: [mysql] host = localhost databse = mudResearch user = netbom

When attempting to connect to the database during the setup I get:

2023-05-12 15:29:25,891 - stderr - CRITICAL - Exception in Tkinter callback 2023-05-12 15:29:25,892 - stderr - CRITICAL - Traceback (most recent call last): 2023-05-12 15:29:25,892 - stderr - CRITICAL - File "/usr/lib/python3.10/tkinter/init.py", line 1921, in call 2023-05-12 15:29:25,892 - stderr - CRITICAL - return self.func(*args) 2023-05-12 15:29:25,892 - stderr - CRITICAL - File "/home/ait/github_tools/MUD-PD/mudpd.py", line 590, in connect_and_close 2023-05-12 15:29:25,892 - stderr - CRITICAL - db_handler_temp.db_connect(self.db_cnx_entries) 2023-05-12 15:29:25,892 - stderr - CRITICAL - File "/home/ait/github_tools/MUD-PD/mudpd.py", line 3980, in db_connect 2023-05-12 15:29:25,892 - stderr - CRITICAL - self.db = CaptureDatabase(self.db_config) 2023-05-12 15:29:25,892 - stderr - CRITICAL - File "/home/ait/github_tools/MUD-PD/src/capture_database.py", line 605, in init 2023-05-12 15:29:25,892 - stderr - CRITICAL - self.cursor = self.cnx.cursor(buffered=True) 2023-05-12 15:29:25,892 - stderr - CRITICAL - AttributeError: 'CaptureDatabase' object has no attribute 'cnx'

If you have any suggestions - it would be most appreciated.