Can I connect to my Railway MySQL in jupyter lab with python?
I'm trying to get the data from my MySQL db into a csv and analyze it. Can't find a resource to do so. I tried installing mysql-connector-python and using import mysql.connector and using
db = mysql.connector.connect(
host = " ",
user = " ",
password = ""
)
but it keeps saying Can't connect to MySQL server on "...railway.app"
Solution:Jump to solution
you would either need to use the database url variable, or all all the other environment variables available for your database
5 Replies
Project ID:
N/A
N/A
Solution
you would either need to use the database url variable, or all all the other environment variables available for your database
ah okay gotcha let me try it
yay cool it works, I just needed to add port and database thank you!
no problem!