Intellj Idea Basic use of Mysql database (08001 error)

I saw the database plug-in in Intellj Idea before, but I haven't used it before.

 

1.   Open Idea, mine is already on the right side, if yours is not. can choose 

View-> Tool Windows-> Database in the top menu bar   

Click the + sign in the view to create your database connection

2. Enter the corresponding database information, if there is a prompt below that the dirver file is missing, remember to click to download, to put it bluntly is to download some support packages connected to the database

3. Shout with me: lying trough, what the hell!

At this time, I remembered that if the database server is 8.0, the driver is not the previous com.mysql.jdbc.Driver ,

It's com.mysql.cj.jdbc.Driver , will it be the reason, so the instinctive reaction will look at the options.

Scroll down to see this

But still that error. . . So smoked a cigarette and thought about it, oh yes, my database is still version 5.6, the driver is version 8.0

Inadvertently clicked on this

Select the Driver -> MYSQL for 5.1

If there is no accident, you will be prompted to download the driver file, continue to click download, and then the configuration is OK

 

4. Table list display

Here you can see all the tables in your database

Double-click to see the view effect

5. View the table creation statement 

Select the table and click the pen-like icon above to view the table-building statement

6. Create query view and write sql statement

Select the window menu with QL on the upper right, you can write SQL statements in it, and operate it

 

The execution results are displayed at the bottom , I feel pretty good, but I feel that they are all in a development tool, a little messy, I feel not very convenient, maybe it is a habit problem. . .

 

For a simple use, let's get here first. . . . (Mainly unaccustomed, it is better to use other tools, Alt + tab switch to see cool)

 

My personal original, if there is any similarity, is purely coincidental, or contact me to make changes. Please reprint or CV combination indicate the source, thank you! (If you have any questions or errors, please point out, I QQ: 752231513)

Published 20 original articles · praised 45 · views 100,000+

Guess you like

Origin blog.csdn.net/qq_30548105/article/details/92829748