Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hecdelatorre/pythonmysqlconnector
https://github.com/hecdelatorre/pythonmysqlconnector
Last synced: about 19 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/hecdelatorre/pythonmysqlconnector
- Owner: hecdelatorre
- License: gpl-3.0
- Created: 2021-07-28T23:09:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-15T23:26:38.000Z (almost 3 years ago)
- Last Synced: 2024-11-11T18:15:34.087Z (2 months ago)
- Language: Python
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Python - mysql connector
Necessary libraries
```
pip install mysql-connector-python
```
```ssh
pip install simple-term-menu
```
![Screenshot-at-2021-07-29-22-32-20.png](https://i.postimg.cc/ZR50Kf8X/Screenshot-at-2021-07-29-22-32-20.png)
![Screenshot-at-2021-07-29-22-40-49.png](https://i.postimg.cc/sxBX5v0c/Screenshot-at-2021-07-29-22-40-49.png)
![Screenshot-at-2021-07-29-22-45-20.png](https://i.postimg.cc/TwN1yrQ1/Screenshot-at-2021-07-29-22-45-20.png)
* Create database
```sql
CREATE DATABASE prueba;
```
```sql
USE prueba;
```
* Create table
```sql
CREATE TABLE `Usuario` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,
`age` int(3) DEFAULT NULL,
PRIMARY KEY (`id`)
);
```
* Insert data
```sql
INSERT INTO Usuario (username, email, age)
VALUES('user', '[email protected]', 18);
```
* Select
```sql
SELECT * FROM Usuario;
```
```sql
SELECT * FROM Usuario WHERE id = 1;
```
[![logoN1-w.png](https://i.postimg.cc/bvwkKP8Y/logoN1-w.png)](https://github.com/Hec98)