
Learn how to use MySQL with Python, connect Python to MySQL, and work with an open source, free database popular for websites, big data, and machine learning.
Compare databases to big spreadsheets to visualize structure and function. Explore how tables hold records, columns enforce data types, and how you add, update, remove, and retrieve data.
Download and install Python from python.org, uninstalling older versions and ensuring Python 3.x is added to the path on Windows; also install a text editor like Sublime Text.
Install git bash on Windows to get a lightweight terminal for running commands, and configure default editor, path, ssh and ssl options to use Mac or Linux style commands.
Install the MySQL community server and the MySQL Workbench to manage databases while using Python in this course. Download the full Windows installer (273 MB) to avoid installation issues.
Install the MySQL server and MySQL Workbench using the installer. Configure a root user with a password, enable the Windows service, and prepare for Python connections.
Set up the development environment by installing MySQL, Python, and Git Bash. Create a directory and install MySQL Connector with pip to enable Python to connect to MySQL.
Learn to connect a Python program to a MySQL database using mysql.connector by importing the module, creating a connection with host, user, and password, and verifying the connection.
Explore MySQL Workbench, a graphical tool for visualizing and editing your database, running SQL queries, viewing schemas, and experimenting with the World database and sample data.
Create a new database in Python using a cursor to execute create database test DB, then print the databases to verify with MySQL workbench.
Create a users table in test db with Python by configuring the database, creating a cursor, and executing a create table command with varchar fields and auto increment primary key.
Learn how to insert a single record into the users table with an auto-incremented id, using SQL insert into, placeholders like %s, and commit.
Add multiple user records by building a Python list of tuples and executing a parameterized insert statement, then commit and verify auto-incremented IDs in MySQL Workbench.
Discover common data types in MySQL, including varchar, int, float, text, and date types, and learn how to choose the right type for text, numbers, and binary data.
Learn to pull data from a MySQL table with Python by creating a cursor, executing a select query, and fetching results. Use specific columns and fetchone for single records.
Learn to format query results into readable reports by building strings with placeholders, using tabs and headers to display name, email, age, and id in the terminal.
Learn to use the where clause to filter user data in sql with python, applying conditions like age > 30, age < 30, and name equals 'John', including string quotes.
Explore how the like clause and percent wildcards let you search patterns, such as names starting with J or containing an i, and how placing wildcards at ends yields results.
Learn to use and and or in SQL with a select statement to filter by multiple conditions, such as a name with an i and age 29, or either condition.
Learn to update records with SQL using an update query on users table, set age, apply a where clause, commit via cursor, and rely on user_id as the primary key.
Limit results and offset the first rows in a select from the users table. Order by name or age with ascending or descending order.
Delete records in a MySQL table using a delete statement with a where clause, then commit; delete by a unique field like the user id to avoid removing multiple rows.
drop a table in MySQL with Python and safely back it up by exporting to CSV or JSON, then re-import using the table data import wizard.
Explore a lifetime membership with access to over 60 courses, including MySQL with Python, Django, and more, with a $200 Udemy discount and a 30-day money-back guarantee.
These days everything uses a database, and MySQL is one of the most popular databases out there. FREE and Open Source, Mysql is a great database for just about all your needs.
Likewise, Python is one of the most popular and powerful programming languages today. Pairing the two together is a powerful combination!
In this course you'll learn the basics of using MySQL with Python.
You'll learn how to create databases and tables, add data, sort data, create reports, pull specific data, and more.
For this courses I'll assume you already have a basic knowledge of Python programming, but you don't need to know anything at all about databases or MySQL to take the course.
You'll learn...
What Is A Database
How To Install Python
How To Install Git Bash Terminal
How To Download MySQL
How To Install MySQL and Workbench
How To Install MySQL Connector
How To Connect to Database in Python
How To Explore The MySQL Workbench
How To Create A Database
How To Create A Table
How To Insert One Record Into Table
How To Insert Many Records Into Table
Understanding Data Types
How To Select Data From Table
How To Format Our Results
How To Use The Where Clause
How To Use The Like Clause and Wildcards
How To Use AND and OR
How To Updating Records
How To Limit and Order Results
How To Delete Records
How To Delete (Drop) A Table And Backups
And More!
I'll walk you through all of this and more, step by step. If you have any question along the way, I'm here to answer them.
If you've ever wanted to understand databases or use them in your Python programs, this is the course for you.
We'll download everything you need for this course for free, you don't need any special tools!
I'll see you on the inside!
-John Elder