Use pymysql for sql connection.

This commit is contained in:
alwayscompiling
2022-12-10 16:12:21 -05:00
parent 7e23ac14ff
commit c67e9ae617
3 changed files with 3 additions and 4 deletions
-2
View File
@@ -6,8 +6,6 @@ services:
container_name: "Highscores-DataBase"
volumes:
- highscores_data:/var/lib/mysql
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=${SQL_PASS}
- MYSQL_ROOT_USERNAME=${SQL_USER}
+2 -1
View File
@@ -2,4 +2,5 @@ nextcord>=2.3.2
python-dotenv>=0.20.0
pandas>=1.5.2
sqlalchemy>=1.4.44
mysqlclient>=2.1.1
pymysql>=1.0.2
cryptography>=2.8
+1 -1
View File
@@ -8,7 +8,7 @@ from sqlalchemy.ext.automap import automap_base
from utilities import config
# connect with sql alchemy and autoload schema
url = f"mysql://{config.SQL_USER}:{config.SQL_PASS}@{config.SQL_HOST}/{config.SQL_DB}"
url = f"mysql+pymysql://{config.SQL_USER}:{config.SQL_PASS}@{config.SQL_HOST}/{config.SQL_DB}"
engine = create_engine(url)
Base = automap_base()
Base.prepare(autoload_with=engine)