• Plans & Pricing
  • Log in
  • Get started
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Newsletter
  • Professional Email
  • Website Design Services
  • Commerce
  • WordPress Studio
  • Enterprise WordPress 
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
  • Support Center
  • WordPress News
  • Business Name Generator
  • Logo Maker
  • Discover New Posts
  • Popular Tags
  • Blog Search
Get started
  • Sign up
  • Log in
About
  • Plans & Pricing
Products
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Newsletter
  • Professional Email
  • Website Design Services
  • Commerce
  • WordPress Studio
  • Enterprise WordPress  
Features
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
Resources
  • Support Center
  • WordPress News
  • Business Name Generator
  • Logo Maker
  • Discover New Posts
  • Popular Tags
  • Blog Search
Jetpack App
  • Learn more
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
Search
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
Forums / MYSQL Database access from python

MYSQL Database access from python

  • Unknown's avatar
    pietrdgr · Member · Mar 25, 2023 at 9:20 pm
    • Copy link Copy link
    • Add topic to favorites Add topic to favorites

    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: Yes

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar
    staff-totoro · Staff · Mar 26, 2023 at 8:01 pm
    • Copy link Copy link

    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.

Tags

  • account
  • design
  • has-jetpack
  • Jetpack
  • wpcombusiness
  • wpcomhelp

About this topic

  • In: Support
  • 2 participants
  • 1 reply
  • Last activity 3 years
  • Latest reply from pietrdgr

Couldn't find what you needed?

Contact us

Contact us

Get answers from our AI assistant, with access to 24/7 expert human support on paid plans.

Browse our guides

Browse our guides

Find step-by-step solutions to common questions in our comprehensive guides.

WordPress.com

Products
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Professional Email
  • Website Design Services
  • WordPress Studio
  • Enterprise WordPress
Features
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
Resources
  • WordPress.com Blog
  • Business Name Generator
  • Logo Maker
  • WordPress.com Reader
  • Accessibility
  • Remove Subscriptions
Help
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
  • Developer Resources
Company
  • About
  • Press
  • Terms of Service
  • Privacy Policy
  • Do Not Sell or Share My Personal Information
  • Privacy Notice for California Users
DeutschEspañolFrançaisBahasa IndonesiaItalianoNederlandsPortuguês do BrasilSvenskaTürkçeРусскийالعربيةעִבְרִית日本語한국어简体中文繁體中文English

Mobile Apps

  • Download on the App Store
  • Get it on Google Play

Social Media

  • WordPress.com on Facebook
  • WordPress.com on X (Twitter)
  • WordPress.com on Instagram
  • WordPress.com on YouTube

Automattic

Automattic
Work With Us
    • WordPress.com Forums
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • Manage subscriptions