Published on October 28, 2018:
In this video, we will learn:
1. Connect to MYSql database on aws
2. Create a table in MYsql database
3. Insert data to the created table
In the previous video, we learnt:
1. Create table in sqlite database
2. Insert data to the created table
3. Fetch data intserted to the table
Previous Video:
[ Ссылка ]
Additional Reading material:
NA
#Script used
#Cell 1
#Install package
!pip install pymysql
#cell 2
#import package
import pymysql
conn = pymysql.connect(
host='anicca1729.cumujmxbxcet.ap-southeast-1.rds.amazonaws.com',
port=int(3306),
user="admin",
passwd="Welcome123",
db="SalesDB",
charset='utf8mb4')
cursor=conn.cursor()
create_table="""
create table salespeople (
salesPersonId int,
salesPersonName varchar(20)
)
"""
cursor.execute(create_table)
insert_statement="""
Insert into salespeople
(salesPersonId,salesPersonName)
values
(1,'Daffy Duck')
"""
cursor.execute(insert_statement)
conn.commit()
conn.close()
SUBSCRIBE to learn more about Power BI,Power Query, Power Pivot, Excel,SQL Server and Python!!
[ Ссылка ]
Our Playists:
SQL Playlist :[ Ссылка ]
DAX PlayList : [ Ссылка ]
Power BI PlayList: [ Ссылка ]
Power Query Playlist: [ Ссылка ]
Getting Started with Power BI:[ Ссылка ]
Getting Started with Python: [ Ссылка ]
Data Science With Python:[ Ссылка ]
ABOUT DAGDOO:
Website:
Home Page: [ Ссылка ]
Power BI Tutorials: [ Ссылка ]
Questions? Comments and SUGESTIONS? You will find me here:
Twitter: @dagdooe
Category: Science & Technology
License: Standard YouTube License
![](https://s2.save4k.ru/pic/IlXnCVNQvCA/mqdefault.jpg)