pip install pymysql
import pymysql.cursors

db = pymysql.connect(host='host.mysql.com', 
                     user='usuario',
                     passwd='senha',
                     db='banco de dados')

cur = db.cursor()

# to apply SQL
cur.execute('SELECT * FROM tabela;')

for row in cur.fetchall():
    print(row)

db.close()
Este artigo foi útil ?
SimNão

6 Replies to “Pymysql – Conexão Mysql com Python”

  1. r7betbr disse:

    Heard good things about the R7betbr promotions, so I signed up. Got a decent welcome bonus which was cool. The site is targeted to the Brazilian market, so the language and currency are on point if that’s what you’re after. Solid option if you’re in Brazil looking for a reliable betting platform: r7betbr

  2. mcw77bet disse:

    Yo, MCW77bet is the place to be! Really dig the selection of games they got. Site’s smooth, easy to use, and I’ve actually pulled out a few wins. Definitely worth checking out. mcw77bet

  3. unobetslot disse:

    Spun some reels at Unobet Slot, accessed via their info address. Found a few games I liked, UI’s decent. Won a little, lost a little – swings and roundabouts. Have a gander: unobetslot

  4. winddwim disse:

    Winddwim is pretty cool! It’s got a different vibe from the usual casinos, and I’m digging it. Give it a spin and see what you think. Try it now: winddwim

  5. fun88tntf disse:

    Fun88tntf, i heard that there is a nice signup bonus. Gonna give it a try. Check it out yourself: fun88tntf

  6. 9dgame7 disse:

    9dgame7, sounds pretty futuristic! Let’s see what kind of games they’ve got. Maybe I’ll find a new favorite. 9dgame7

Deixe um comentário para unobetslot Cancelar resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Close Search Window