https://github.com/rohancyberops/mysqlconnection
https://github.com/rohancyberops/mysqlconnection
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rohancyberops/mysqlconnection
- Owner: RohanCyberOps
- License: mit
- Created: 2024-10-20T12:34:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-17T05:06:59.000Z (over 1 year ago)
- Last Synced: 2025-03-10T19:51:28.974Z (over 1 year ago)
- Language: Python
- Size: 45.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
---
# π MySQL Database Interface
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.
## π Features
- **π 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.
## πΈ Demo

*Watch how the connector work in real-time!*
## π Requirements
- **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)
## π₯ Installation
1. **Clone the repository** (or download the project files):
```bash
git clone https://github.com/chrohangurjar1/MySQLConnection-.git
cd mysqlconnection
```
2. **Create and activate a virtual environment** (optional but recommended):
```bash
python -m venv .venv
.venv\Scripts\activate # On Windows
source .venv/bin/activate # On macOS/Linux
```
3. **Install the required packages**:
```bash
pip install mysql-connector-python
```
## π₯οΈ Usage
1. **Run the application**:
```bash
python mysqlconnection.py
```
2. **Connect to the Database**:
- Input your MySQL server's **Host**, **Database**, **User**, and **Password**.
- Click the **Connect** button.
3. **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. π
4. **Close the Application**:
- Click the close button on the application window or use the **Close** option to terminate the application gracefully.
## β¨ Example SQL Queries
Here are some example SQL queries you can run:
- **Create a New Table**:
```sql
CREATE TABLE IF NOT EXISTS users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
age INT
);
```
- **Insert Data**:
```sql
INSERT INTO users (name, age) VALUES ('John Doe', 30);
```
- **Fetch Data**:
```sql
SELECT * FROM users;
```
## π Contributors
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. π
## π License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
## π Acknowledgements
- [Tkinter Documentation](https://docs.python.org/3/library/tkinter.html)
- [MySQL Connector/Python Documentation](https://dev.mysql.com/doc/connector-python/en/)
---