Databases 7 min read

Master DataGrip: Essential Tips for Efficient MySQL & MongoDB Management

This guide walks you through downloading DataGrip, configuring its appearance, creating MySQL and MongoDB data sources, managing tables, applying powerful SQL editing shortcuts, and leveraging export and execution‑plan features to write higher‑quality database code.

macrozheng
macrozheng
macrozheng
Master DataGrip: Essential Tips for Efficient MySQL & MongoDB Management

Download

Download DataGrip from the official JetBrains website: https://www.jetbrains.com/datagrip/

Appearance Settings

Adjust the IDE font size via File->Settings → Appearance & Theme, and the editor font size via Editor->Font.

Create Data Source

To work with a database, first create a data source. Click the plus sign → Data Source->MySQL, fill in the connection details, and add the missing serverTimezone parameter (e.g., Asia/Shanghai) in the Advanced options before testing the connection.

Table Management

After a successful connection, all tables appear in the left pane.

Right‑click a table → Modify Table to view its definition.

Double‑click a table to browse its data with pagination.

Hide unwanted columns via the column‑header context menu.

Use the filter bar to write WHERE clauses for data filtering.

Right‑click the database name → New Table to create a table, add columns, and preview the generated SQL.

Export data to CSV, HTML, Excel, JSON, and other formats.

SQL Editing Tips

Open a query console with Right‑click → Open Query Console.

Enjoy intelligent code completion for tables, columns, and SQL keywords.

Replace * with explicit columns by selecting * and pressing Alt+Enter.

When a table alias is used, press Alt+Enter to prepend the alias to all selected columns.

For INSERT INTO statements, use the intention action to generate the column list automatically.

Hover over functions to see detailed documentation.

Format SQL with Ctrl+Alt+L.

View execution logs and local history via Right‑click → Local History->Show History.

Run Explain Plain on a statement to view its execution plan.

MongoDB Support

Create a MongoDB data source via the plus sign → Data Source->MongoDB, configure the connection, test it, browse collections, set filter conditions, and insert documents.

Conclusion

This guide covers the most common operations and handy shortcuts for managing MySQL and MongoDB databases with DataGrip, enabling users familiar with other JetBrains tools to become productive quickly.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

sqlmysqlMongoDBDatabase ToolsDataGrip
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.