xxxxxxxxxx
sudo apt-get install -y python-dev libmysqlclient-dev && sudo pip install mysqlclient
xxxxxxxxxx
You can install mysqlclient with pip
If using Python3, try this:
pip3 install mysqlclient
or in Python2
pip install mysqlclient
xxxxxxxxxx
sudo apt-get install libmysqlclient-dev
sudo apt-get install libssl-dev
pip install mysqlclient
xxxxxxxxxx
#file location: /wp-content/plugins/woocommerce/includes/wc-template-functions.php
xxxxxxxxxx
1: Install PyMySQL:
pip install pymysql
2: Update your main.py to use PyMySQL by adding the following lines before creating the engine:
import pymysql
pymysql.install_as_MySQLdb()
3: Ensure that your database URL is correctly configured to use mysql+pymysql:
DB_URL = "mysql+pymysql://user:password@host/dbname"