updated to mysql-connector-python
This commit is contained in:
1 parent
65691a0aee
commit
4bc9b87317
6 files changed
+80
-68
No files matched your search
@@ -3,7 +3,7 @@
|
||||
Student Management System
|
||||
==========================
|
||||
Terminal CRUD application for STUDENT / GUARDIAN / ATTENDANCE, backed by
|
||||
MySQL on 10.0.1.40:3306 (student_db).
|
||||
MySQL on 10.10.0.160:3306 (student_db).
|
||||
|
||||
On startup this:
|
||||
1. Connects to the MySQL server.
|
||||
@@ -17,7 +17,7 @@ Run:
|
||||
|
||||
import sys
|
||||
|
||||
import pymysql
|
||||
import mysql.connector
|
||||
|
||||
import crud
|
||||
import db
|
||||
@@ -326,7 +326,7 @@ def main():
|
||||
main_menu(conn)
|
||||
except KeyboardInterrupt:
|
||||
print("\n\nInterrupted. Exiting.")
|
||||
except pymysql.err.MySQLError as e:
|
||||
except mysql.connector.Error as e:
|
||||
print(f"\n[ERROR] Lost database connection: {e}")
|
||||
sys.exit(1)
|
||||
finally:
|
||||
|
||||
Reference in new issue
Block a user