Introduction
Python is one of the familiar programming languages in the world. For a developer or programmer, it's important to develop a project to gain experience in any programming language whatever he or she learning.
Using python we can build so much things which can solve a real-world problem. It is one of the best achievements for a developer to solve a real-world problem using a programming language.
In this tutorial, you'll learn to create a login and registration form using python and MySQL. It is one of the interesting projects using python and MySQL. Let's see the project details.
👉Visit Also: Meditation App in Python Tkinter: Practice Deep Breathing
Project Details
The project file contains one folder, named 'Images' and three python files, 'login_page.py', 'signup_page.py', and 'credentials.py'. The 'Images' folder contains two images that have been used in this project.
The names of the first two python files are indicating which file is for what purpose. 'credentials.py' contains credentials to log in to the MySQL server. Since we'll be working with the database, you'll need to install a MySQL server on your system (Learn How to Install MySQL on Windows, Linux, and Mac). If you already have it, follow the next step.
Create a Database and a Table
Create a Database with this name: "student_database".
create database student_database;
Create the table "student_register" under the "student_database" database.
create table student_register(
f_name VARCHAR(50) NOT NULL,
l_name VARCHAR(50) NOT NULL,
email VARCHAR(100) NOT NULL,
question VARCHAR(50) NOT NULL,
answer VARCHAR(100) NOT NULL,
password VARCHAR(50) NOT NULL,
PRIMARY KEY ( email )
);
What can you learn from this project?
- Python Tkinter Project: Creating GUI window, frame, label, dropdown box, entry widget, checklist widget, add images in Tkinter, Tkinter button, etc.
- Connect python with MySQL: How to connect python to MySQL, insert data in a table using python, fetch data from a database, update data in MySQL database, etc.
- Creating python modules to manage various task.
- Object-oriented programming: Using classes, objects, etc.
Requirements and Installation
Install Tkinter
The Graphical User Interface(GUI) of this login and registration form has been managed using the python Tkinter library.
☛pip install tk
Install PyMySQL
This package has used here to Connect Python with MySQL. Install it at the very first step. Otherwise, you'll not be able to work with MySQL database using python.
☛pip install PyMySQL
Download the Source Code
You can Download the Project File directly from my GitHub page(https://github.com/subhankar-rakshit) through the download button.
GitHub Page |
Summary
In this tutorial, our topic of discussion was a Login and Registration Portal using Python and MySQL database in the backend. The graphical interface of this project is managed by Tkinter Library.
It's an example of basic level project and very simple to use. You just need to follow the steps I mentioned above. For any problem or errors, please let me know through the comment section. I will guide you.
Find more project related to Python and MySQL from here.
👉Student Management System Project in Python with MySQL
👉Library Management System Project in Python with MySQL
👉Contact Management System Project in Python with MySQL
Thanks for reading!💙
PySeek
signup page was not working
ReplyDeleteReach me at pyseek89@gmail.com.
DeleteSend me the detail information of those error messages.
I will guide you.
how to connect with database ?
ReplyDeleteHow to create database and where?
which operating system currently you're running?
DeleteCan I connect the database using MySQL connector ?
ReplyDeleteTry with this: import mysql.connector
ReplyDeleteLet me know again, whether the problem is solved or not.
No change same error coming. Any other solution ???
ReplyDeleteContact me at pyseek89@gmail.com
DeleteAlso send the screen shot of the error message.