Problem in connecting with MySQL tracker store on local machine

Hi I tried to connect my bot with a MySQL tracker store, having mysql server at local machine. but i got error **'ModuleNotFoundError: No module named ‘MySQLdb’'on running bot with command “rasa run -m models --endpoints endpoints.yml”. Screenshot:

in endpoints.yml: I had created database in mysql server on my local machine earlier. Please help me to resolve the issue. Thanks

Hi, @singhvinay1987 update this.

tracker_store:

   type: SQL

   dialect: "mysql+pymysql"  # the dialect used to interact with the db

   url: "localhost"  # (optional) host of the sql db, e.g. "localhost"

   db: "rasadb"  # path to your db

   username: "root"  # username used for authentication

   password: "**************"  # password used for authentication

After updating this on the tracker store, when you run the code. It will ask you to install some package try install that package and its good to go. Do open the MySQL or My SQL WorkBench at the backend. Note: Mention the correct username and password and db name.

After you see the errors:

install this

pip install PyMySQL
pip install psycopg2-binary

Good Luck!

Hi Nik thanks for your response! I tried the same you suggested but now it shows different error. Mentioned in screenshot below:

Any help will be appreciated. Thanks

@singhvinay1987 Sorry for late reply. I think your port is utilised with some other rasa command on 5005. Please close all the terminal or even if you have docker running you also need to close.

Or

Steps to kill the process:

WINDOWS

  1. find the PID number by running:

netstat -ano | findstr :5005

  1. Enter PID number below to kill the process

taskkill /PID 5005 /F

Do, share me the error.

Can you confirm that your database rasadb is connect whilst seeing the --debug logs when you run rasa ?

1 Like

Thanks Nik, after closing other cli windows it worked for me. Thanks again for helping.

@singhvinay1987 It’s ok. Glad It helped you. Please close this thread with the solution for others. Thanks.

Hey Nik i am looking for the options for marking it as solution but found no button for that.

@singhvinay1987 Please click edit this topic and change its category to rasa open source. I think you will be able to see it. This topic is coming in Announcements and Release Announcements. Good Luck!

yes tried this but still no option and the category is also not changed.

i tried this in my linux based server it is working but the ted policy prediction started getting wrong output @nik202

1 Like

@anshal its not related to connecting SQL, please create new thread for your TED policy issue.

1 Like

@nik202 it is related to SQL because when I didn’t connect to SQL endpoints then the prediction is working but after connecting to SQL it will give the wrong prediction pls help.

1 Like