Detailed steps for connecting to the mysql database in pycharm, pycharmmysql

Source: Internet
Author: User

Detailed steps for connecting to the mysql database in pycharm, pycharmmysql

Preface

Recently, When I configured a pycharm project in a new environment, I found that pycharm cannot connect to the mysql database. Because the java environment has been installed but related libraries have not been configured, and jetbrains IDE is generally written in java, it is assumed that java lacks the mysql driver. So it was a success, so I shared the process with everyone and needed friends to study and learn together.

1. Ensure that python can connect to the database normally

It can be tested. If no error is reported, the database is connected normally.


If an error is reported, the MySQLdb package may be missing.

Download MYSQLdb first

Official download: MySQLdb

Local download: 32: http://www.bkjia.com/database/552380.html 64: http://www.bkjia.com/database/552384.html

Install the SDK step by step.

2. Configure the java environment

This step provides a lot of online tutorials and is also very simple.

3. Configure pycharm

Download mysql jdbc mysql-connector-java

 

Note the location of the file after decompression

 

Open the database plug-in of pycharm and add a MySQL connection.

 

Complete the items

 

Note that the Driver you see may be different from me at this time, which means you need to proceed

 

 

 

 

After adding, check again and solve the problem.

Summary

The above is all the content of this article. I hope the content of this article will help you in your study or work. If you have any questions, please leave a message, thank you for your support.

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.