Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect IntelliJ with local MySQL?

I have been struggling to learn how the localhost MySQL and IntelliJ to connect and program a database related task. Is that Possible? If yes, how to achieve it?

like image 995
RAJMOHAN Avatar asked Jul 29 '16 13:07

RAJMOHAN


People also ask

How do I open a Database in IntelliJ?

In the Database tool window (View | Tool Windows | Database), you can work with databases and DDL data sources. You can view and modify data structures in your databases, and perform other associated tasks. To view a table, double-click the table.


1 Answers

Connecting to a local instance is essentially the same as connecting to a remote instance of MySQL. Just substitute either localhost, or 127.0.0.1 in place of the IP address you would use normally.

To add a new database connection (called a data source in IntelliJ), open the Database window View -> Tool Windows -> Databases, then click the + sign and select Data Source and then MySQL from the sub-menu. The defaults for the MySQL connection should for a local install of MySQL.

To open a connection, right click on your new data source and select Open Console.

Official IntelliJ Documentation - Managing Data Sources

like image 171
James Wynn Avatar answered Sep 23 '22 16:09

James Wynn