Welcome to the MySQL Database Interface! This user-friendly graphical application allows you to effortlessly connect to a MySQL database, execute SQL queries, and view the results—all through a sleek and intuitive GUI.
-
🔗 Connect to MySQL Database: Easily input your database credentials to establish a connection.
-
🛠️ Execute SQL Queries: Run any valid SQL query directly against your connected database.
-
📊 Display Results: View the results of your queries in a scrollable and organized text area.
-
⚠️ Error Handling: Receive clear, user-friendly messages for any errors encountered during database operations.
Watch how the connector work in real-time!
- Python: 3.6 or later
- MySQL Server: Ensure you have access to a MySQL server.
- Required Python Packages:
mysql-connector-python
tkinter
(included with standard Python installations)
-
Clone the repository (or download the project files):
git clone https://github.com/chrohangurjar1/MySQLConnection-.git cd mysqlconnection
-
Create and activate a virtual environment (optional but recommended):
python -m venv .venv .venv\Scripts\activate # On Windows source .venv/bin/activate # On macOS/Linux
-
Install the required packages:
pip install mysql-connector-python
-
Run the application:
python mysqlconnection.py
-
Connect to the Database:
- Input your MySQL server's Host, Database, User, and Password.
- Click the Connect button.
-
Execute SQL Queries:
- Enter your SQL query in the provided input field.
- Click the Execute button to run your query.
- The results will be displayed in the scrollable text area. 📜
-
Close the Application:
- Click the close button on the application window or use the Close option to terminate the application gracefully.
Here are some example SQL queries you can run:
-
Create a New Table:
CREATE TABLE IF NOT EXISTS users ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, age INT );
-
Insert Data:
INSERT INTO users (name, age) VALUES ('John Doe', 30);
-
Fetch Data:
SELECT * FROM users;
We want to give a huge shoutout to everyone who has contributed to the project! 🙌 Your hard work and dedication help make this app better every day. 💪
🎉 Thank you all for your amazing contributions! Let's keep building together. 🚀
This project is licensed under the MIT License. See the LICENSE file for more details.