PyChram mysql database connection

1. Provided that you have installed on a computer database mysql good, it can be verified in cmd window, such as shown below:

2. Open PyCharm then find the View -> Tool Windows -> Database and click to enter

3. The right side of the box will pop up Database, followed by clicking the + sign, and then choose Select Data Source MySql

4. Fill Mysql connection address and username and password, as shown :( database called zero)

5. Click the bottom of the Download Connection driver download database connection

Then use the connection test, the test will show success

6. Then apply and ok

After a successful connection as shown in Figure 7. (data inside the database table):

8 can start opening a box with a command to view a database:

9. Enter the sql statement and green arrow run and results follows:

Such Pycharm to connect mysql database is successful

Guess you like

Origin blog.csdn.net/qq_24036403/article/details/91864701