Skip to content
Snippets Groups Projects
Unverified Commit b7c5851e authored by seok's avatar seok
Browse files

mysql

parents
No related branches found
No related tags found
No related merge requests found
import mysql.connector
db = mysql.connector.connect(
host="ajou.cx5xwvfurjwc.ap-northeast-2.rds.amazonaws.com",
user="team",
password="sw_team_two",
database="project",
)
myCursor = db.cursor(buffered=True)
myCursor.execute(
"INSERT INTO user (username, email, password) "
"VALUES ('test1', 'test@ajou.ac.kr', 'test1_1234')"
)
db.commit()
myCursor.execute(
"SELECT * FROM user LIMIT 3"
) # query = SELECT * FROM project.user LIMIT 3;
for row in myCursor:
print(row)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment