DataGrip installation and connection to MySQL database
Jetbrains is a well-known commercial software provider of programming tools, with a lot of software under its banner. Including IDE, team development tools, plug-ins and Microsoft .Net auxiliary tools, including self-created language Kotlin, etc. The family bucket we usually use and say mainly refers to its IDE suite. Jetbrains' IDE tools all support cross-platform, and there are Windows, Linux and MacOS versions.
DataGrip is a cross-platform database tool available on Windows, OS X and Linux. It also supports multiple databases, including SQL Server, Oracle, PostgreSQL, MySQL, DB2, Sybase, SQLite, Derby, HyperSQL, and H2.
DataGrip is a database management client tool, which is convenient to connect to the database server, execute sql, create tables, create indexes, and export data, etc. This graphical interface tool has more powerful functions and more friendly interface prompts.
I believe that when you see DataGrip for the first time, you will have an amazing feeling, just like when you see a girl for the first time, you just glance at it, and you say to yourself, it is her! Without further ado, let's take a look at the common functions of DataGrip.
1. DataGrip installation
Software official website download: https://www.jetbrains.com/products/
You can also download a newer version, the installation process is the same!
1. Download the installation package from the official website, double-click .exe
the file to start the installation:
2. Click next to complete the installation step by step
3. Select the installation directory of DataGrip, and then select Next
Next, perform the installation
2. Connect to the MySQL database
1. Use DataGrip to connect to the MySQL database:
2. After the driver download is complete, click Test Connection:
jar
After the configuration and driver packages are downloaded, you can click " Test Connection
" to test whether you can connect to
MySQL. If " Successed
" appears, the table name connection is successful.
3. Display all databases:
After connecting to the MySQL service, all databases are not displayed. At this time, we need to set and display all databases. The specific operations are as follows:
4. Create a database
5. Enter the database name
Note :
The database can be created in the following two ways:
- A.
create database db01 ;
- B.
create schema db01 ;
6. Create a table
Right click on the specified database and select new
-->Table
Enter the corresponding information:
created successfully
7. Modify the table structure
On the table to be modified, right click and select " Modify Table...
"
- If you want to add a field, just click
+
the number, enter the field information, and then click执行(Execute)
. - If you want to delete a field, click directly
-
to delete the field, and then click执行(Execute)
. - If you want to modify the field,
双击
the corresponding field, modify the field information, and then click执行(Execute)
. - If you want to modify the table name or the comment of the table, directly modify it in the input box, and then click
执行(Execute)
.
8. Execute SQL statements in DataGrip
On the specified database, 右键
, select New
-->Query Console
Then you can open it Query Console控制台
, write SQL in the console, and execute SQL.
Select to execute: