Pycharm installing the MySQL driver package

Source: Internet
Author: User

When the new environment is configured for PYCHARM projects, it is found that Pycharm cannot connect to the MySQL database. Because of the Java environment but have not configured the relevant library, and JetBrains home IDE is generally written in Java, so guess is Java is missing the driver of MySQL.

1. First make sure Python is connected to the database properly

Can be such as testing, if no error, indicating that the normal connection to the database

If there is an error, the MYSQLDB package may be missing
Download MySQLdb first.

You can install it in one step next.

2. Configuring the Java Environment

This step is a lot of online tutorials, also very simple, skip over

3. Configure Pycharm

First download MySQL Jdbcmysql-connector-java this is the official need to register the choice version, and so on, I will directly use my download to put in the Baidu Cloud:

Link:https://pan.baidu.com/s/1vAOfXNnKDUVE6tmYx6W93g Password:fmwj

Note the location of this file after decompression

Open the database plugin for pycharm and add a MySQL connection

Fill in the blanks.

Note that the driver you see at this point may not be the same as me, which means you need to do it.

Add and then look, so the problem solved some will let you update do not ask to ignore, directly can use the

Pycharm installing the MySQL driver package

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.