Sharp Tutorial
Python With Database

Python

Java

C

C++

HTML/CSS

Java Script

PHP

SQL

C Programs

Introduction to Python

  • Introduction to Python
  • History of Python
  • How To Install Software
  • Variables in Python
  • Comments in Python
  • Input/Output
  • If else in Python
  • While Loop
  • For Loop

Collection in Python

  • Numbers in Python
  • List
  • Tuple
  • Set
  • Dictionary
  • Array
  • String

Object Oriented python

  • Function
  • Exception
  • OOPS (class/object)
  • Object Pass & Return
  • Constructor
  • Function Overloading
  • Module in Python
  • Inheritance
  • File Handling

Python With MYSQL And Excel

  • Connect MySql & Python
  • Insert Data MySQL
  • Delete/Update MySQL
  • Select Data From MySQL
  • Working With Excel in Python

Python GUI

  • GUI using Turtle
  • Introduction to Tkinter
  • Login Page using Tkinter
  • Data Grid Example Tkinter
  • Connect Multiple Forms
  • Database with GUI Python

Programs in Python

  • Swap two number
  • Calculate the area
  • Even Odd or Zero
  • Largest ,Middle and Smallest Number
  • Calculate Telephone Bill
  • Print Table of The given Number
  • Factorial of the number
  • Reverse and check number is palindrome
  • check number is prime , armstrong
  • Program to Print the given patterns
  • Guess A Number Game using Random
Click Here

Sharp (2) Tutorials

Python with database

Connect Python With MySQL Database:

Python is used with database application so we can connect python with databases Here we are taking example on python with mysql database.
For this first you have to install mysql on your computer it can be installed either using mysql workbench or wamp server or xammp server etc.There are following steps to connect python with mysql database

1 Install MySql on Your Machine(if already installed no need). Then create the database with following sql query.

 

create database sharp_tutorial
Here username =root (it may be different on another computer)
password=root

2 Install connector of python mysql either using GUI in pycharm or using pip. For GUI install go to File—>setting –> project–>project interpreter–>pip–>search(mysql-connector) –>install

 

How to Connect with MySql using python.

Use the following code to to connect python with mysql database after two above steps

import mysql.connector
db=mysql.connector.connect(
host="localhost",
user="root",
password="root",
database="sharp_tutorial")
print("succecssfully connected with database")

   Output: successfully connected with database(if all three steps done correctly)

Enquiry about Course

Ask your Question

Click Here

Sharp (2) Tutorials

Video/ C Introduction

Watch video in full size

Video tutorial

Follow by Email
Facebook
Facebook
fb-share-icon
YouTube
Copyright © Sharp Tutorial
Build with WordPress
Wordpress Social Share Plugin powered by Ultimatelysocial
Sharp Tutorial