MYSQL Database access from python
-
Hi,
I have a website on a distant server hosted by WP.I would like to connect to mySQL Database from my terminal with Python.
I tried the following command in Jupyter Notebook :
cnx = mysql.connector.connect(user=’myusername’,password=’mypassword’,host=’localhost’,database=’mydatabasename’)
I changed the wp-config.php file as well to have the same informations.
But it doesn’t work. I don’t know what information I have to fill. Especially for ‘host’.
Any idea to help me ?
WP.com: Yes
Jetpack: Yes
Correct account: YesThe blog I need help with is: (visible only to logged in users)
-
Hi there, this is the same question that you asked us in live chat as well, yes? I read that trnascript and it seems that this is related.
I would like to connect to mySQL Database from my terminal with Python.
To clarify, you wish to make a remote connection to the SQL database for lanewsletterdufutur.wpcomstaging.com? It is possible to access the SQL database for your site via the built in phpMyAdmin interface here: https://wordpress.com/hosting-config/lanewsletterdufutur.wpcomstaging.com
More info about accessing your SQL db here: https://wordpress.com/support/phpmyadmin-and-mysql/
Please note that while you can use SFTP to establish a remote connection to your site’s source files, it is not possible to establish a remote connection to your database. The only way to manipulate the db on your WordPress.com site is to access it directly through the admin interface we provide. Because we are a managed host, for security reasons WordPress.com does not support creating additional databases, connecting one site to another database, or external access to any given site’s database.
Let us know if you need further assistance or if you have any questions.
- The topic ‘MYSQL Database access from python’ is closed to new replies.