Skip to content

Connect to a Microsoft SQL Server or a MySQL server - written purely in Python

License

Notifications You must be signed in to change notification settings

BrianLesko/MS-SQL-connect

Repository files navigation

Microsoft SQL Connection

This code implements connection between a SQL server and a python script

 

Dependencies

This code uses the following libraries:

  • pyodbc: For handling the communication between the MS SQL server and the python script

This code relies on the correct setup of SQL Server

  • mysql: for my-sql-connect.py
  • microsoft sql: for ms-sql-connect-odbc and -pymssql

The code also relies on a login being set up for the sql server, the steps to create a login differ between each server type

 

Repository Structure

repository/
├── docs/
│   └── content.png
├── ms-sql-connect-odbc.py # Using the pyodbc library, connect to a MS SQL database
├── ms-sql-connect-pymssql.py # Using the pymssql library, connect to a MS SQL server, issues during testing
├── my-sql-connect.py # Connect to a mysql server
├── requirements.txt # the python packages needed to run locally
└── .gitignore # includes the file names contained in the author's directory not pushed to github

 

Topics

Python | SQL | Communication | Databases
Self taught coding | Mechanical engineer | Robotics engineer 
Brian Lesko | Brian Joseph Lesko

 


 

╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮ ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮ ┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃ ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃ ┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃ ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃ ┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃ ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃ ┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃ ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃ ╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯ ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯

 

X Logo             GitHub             LinkedIn

follow all of these for pizza :)