Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code for connection:

Code Block
languagepy
import mysql.connector

cnx = mysql.connector.connect(
    host="127.0.0.1",
    port=3306,
    user="admin",
    password="password")

cur = cnx.cursor()

cur.execute("SELECT * FROM mainschema.coordinate")
row = cur.fetchone()
print(row)

cnx.close()