Skip to content

Instantly share code, notes, and snippets.

View mushonnip's full-sized avatar
💗
Code!

Abu Mushonnip mushonnip

💗
Code!
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()