Instructions on how to connect to MySQL Server in IntelliJ

As you all know, using MySQL Workbench in parallel with the MySQL server will make manipulating the database easier and more intuitive.

But nowadays there are many modern IDEs that not only support us in compiling and compiling source code, but also support us to work with database management systems.

Instructions on how to connect to MySQL Server in IntelliJ Picture 1

Typical of which are JetBrains products with outstanding functions. In this article, I will guide you to link to MySQL Server using InteliJ - an IDE that is being used by many programmers today.

Ok, let's get started now!

Instructions to link to MySQL Server in IntelliJ

NOTE: In this article I use IntelliJ Ultimate version (link) (If you use Community version, this feature will not be available).

+ Step 1: First, open a Project and click on the Database tab on the right as shown and click the '+' sign to create a connection to the database management system.

+ Step 2: Here, InteliJ supports many different database management systems as well as many different connection types.

In this article I only guide how to connect to a database server installed on the same machine with InteliJ tool. You choose Data Source => MySQL as shown.

Instructions on how to connect to MySQL Server in IntelliJ Picture 3

+ Step 3: Next, you fill in the required information.

  1. (1) The name of the link
  2. (2) Hostname (if on one machine, it is localhost)
  3. (3) The default gateway is 3306
  4. (4) Username and password that you set up when installing MySQL Server
  5. (5) Database name (note that this database must already exist in case you want to link to that database).

Instructions on how to connect to MySQL Server in IntelliJ Picture 5

+ Step 4: Before clicking Test Connection and Ok, you must download the driver file as shown below first (if you create the link for the first time).

Instructions on how to connect to MySQL Server in IntelliJ Picture 7

+ Step 5: After downloading the driver file, we will click on Test Connection and OK to test the connection.

If you see the tool displaying a message with a green area as shown below is fine.

If you cannot connect, check the above information and check if MySQL Service is working.

Instructions on how to connect to MySQL Server in IntelliJ Picture 9

+ Step 6: After connecting, the whole area (2) is the database-related information that we want to link to.

  1. (1) is the console location so that we can write queries that execute queries to the database.

Instructions on how to connect to MySQL Server in IntelliJ Picture 11

+ Step 7: Here I will perform a sample query to show you the power of this tool.

  1. Having code hints, exact suggestions, which words are used a lot will be pushed up first -> very convenient to follow.
  2. The query speed has not been fully tested yet, but it is quite good, feeling much faster in MySQL Workbench.

After writing the query, you click on the blue triangle button (2) to execute the query. Below (3) are the records found by the query.

Instructions on how to connect to MySQL Server in IntelliJ Picture 13

+ Step 8: Next I will guide you to another basic operation that is creating a new table. Right-click and Database name => New => Table as shown below.

Instructions on how to connect to MySQL Server in IntelliJ Picture 15

+ Step 9: This is the interface for us to add tables to the database.

  1. (1) Table name
  2. (2) Operations to add new fields (+), delete data fields (-), change the position of fields (up arrow)
  3. (3) Add attributes for data fields
  4. (4) Script corresponding.
  5. (5) After adding all the information, click Execute to execute the script and create a new table.

Instructions on how to connect to MySQL Server in IntelliJ Picture 17

+ Step 10: This is the newly created data table.

Instructions on how to connect to MySQL Server in IntelliJ Picture 19

Ok, so I have just guided very in detail with you how to connect MySQL Server in IntelliJ already.

It can be said that IntelliJ has integrated almost everything that MySQL Workbench has, to be able to work with MySQL Server.

However, to say that it is completely replacement, I think it is not quite. Because most users are familiar with MySQL Workbench, even when installing MySQL, they install MySQL Workbench by default to work.

So I think, depending on the purpose as well as their convenience, it is possible to use both of these products in combination. See you in the next posts!

4.1 ★ | 14 Vote

May be interested

  • MySQL vulnerabilities allow malicious servers to steal data from customersMySQL vulnerabilities allow malicious servers to steal data from customers
    someone can take advantage of this problem to steal sensitive data from an improperly configured web server, allowing connection to untrusted servers or from database management applications. .
  • Instructions on how to install MySQL on Windows 11 computersInstructions on how to install MySQL on Windows 11 computers
    detailed instructions step by step to install mysql on windows 11. how to set up mysql server on the most complete windows 11 computer
  • Use Web browser to connect FTP ServerUse Web browser to connect FTP Server
    there are many ways to connect to the ftp server and access the content in it. however, the simplest way is to use internet explorer. the ftp connection method via internet explorer is used in case you only want to download or view files stored on ftp public server (with incognito mode).
  • How to Learn PHP and MySQLHow to Learn PHP and MySQL
    php is one of the most widely-used programming languages on the internet, and it allows you to do much more than simple html. mysql allows you to easily create and modify databases on your server. used together, these tools can create...
  • How to Install the MySQL Database Server on Your Windows PCHow to Install the MySQL Database Server on Your Windows PC
    this wikihow teaches you how to install the mysql server program on a windows 10 computer. in order to install mysql on a windows computer, you must first have python 2.7 (not python 3+) installed. open the python download page. go to...
  • Malware stored in Google Sites sends data to the MySQL serverMalware stored in Google Sites sends data to the MySQL server
    recently, security researchers have found some malware hosted on the google sites platform to build on websites. however, the real threat lies in the fact that a fraudster who steals information can take advantage of this flaw to send the victim's data to their own controlled mysql server simply and quickly. .
  • Guide to creating Virtual Hosting with PureFTPd and MySQLGuide to creating Virtual Hosting with PureFTPd and MySQL
    in the following article, tipsmake.com will show you how to install the pureftpd server using virtual user accounts from mysql's database, all inside the real system.
  • Install Cherokee with PHP5 and MySQL supported in Fedora 14Install Cherokee with PHP5 and MySQL supported in Fedora 14
    currently, cherokee is one of the lightest web server, high flexibility and easy to configure and set up. in addition, it also supports many advanced technology platforms such as fastcgi, scgi, php, cgi, encryption connecting tls and ssl protocols, virtual hosts, encryption mechanisms, load balancing of resources, data data of the system, apache log file ...
  • How to install MySQL Workbench Community Edition on Windows 10How to install MySQL Workbench Community Edition on Windows 10
    detailed instructions on how to install mysql workbench community edition on windows 10 to manage operations with mysql database management system more easily ..
  • Access applications directly to XAMPP MySQL ServerAccess applications directly to XAMPP MySQL Server
    in this article, we use the linux operating system ojuba 2 - 1 based on fedora 10 framework framework, the account used here is root