Skip to content

Instantly share code, notes, and snippets.

View mushonnip's full-sized avatar
🇮🇩
Working from home

Abu Mushonnip mushonnip

🇮🇩
Working from home
View GitHub Profile
@mushonnip
mushonnip / connection.py
Created October 3, 2018 09:45 — forked from adnanfajr/connection.py
Simple Python CRUD with MySQL
#!/usr/bin/python
import MySQLdb as mdb
import sys
try:
con = mdb.connect('localhost', 'USERNAME MYSQL', 'PASSWORD MYSQL', 'NAMA DATABASE');
cur = con.cursor()
cur.execute("SELECT VERSION()")
ver = cur.fetchone()