Skip to content

How can I directly read information from a MySQL database? #500

Answered by longxiaofei
bbzcx asked this question in Q&A
Discussion options

You must be logged in to vote
  1. use latest pre-release pygwalker:

    pip install --upgrade --pre pygwalker

  2. install extra database client

    pip install pymysql

example:

from pygwalker.data_parsers.database_parser import Connector
import pygwalker as pyg
 
conn = Connector(
    "mysql+pymysql://username:password@host/database/schema",
    """
        SELECT
            *
        FROM
            XXX
    """
)

pyg.walk(conn)

more detail refer it: https://pygwalker-docs.vercel.app/api-reference/dataset

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bbzcx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants