I have IntelliJ 2016.2.5 and want to work with SQL. I went to configure -> Plugins -> Searched: SQL
it seemed that it has been installed but when I click creat proj.
I dont know where I can start to create a SQL project? I found "Intellij Plattform Plug in" and once I click SQL it says
I dont understand. Can someone help me?
--> Please tell me step by step.
Here is my answer (This is for NEWBIE/ BEGINNERS SQL for IntelliJ):
Fallow my steps:
first of all you need a simple .sql file. You can create it by notepad and then save as .sql
Check if your IntelliJ SQL plug in is installed
You need to install MySQL http://dev.mysql.com/downloads/installer/ (this is for windows!!) Remember! You username and Password and your install must be succeed. If it's not working then IntelliJ cant communicate SQL server.
Create Empty project
click database
Click plus..
YOU MUST CLICK "DOWNLOAD MISSING FILES"
First you go Database and Ctrl + Space
it pop up a window and you here you must enter your MySQL user and password
then you can find your file..
You must enter (again) your user and password SQL and you must TEST if its working before you click ok
Now there, type anything you want and press run
And here is the result.
Happy Coding.
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?
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
As of Community version 2017.2, the DB Browser does not come bundled with the IDE (at least not on my last two installations). In order to activate it, you should navigate in the IDE in **File->Settings->Plugins->Browse repositories and select "Database" from the dropdown menu. From there you can install the Database Navigator. After the installation has been successful, you should restart the IDE. Then you can select **View->Tool windows->DB Browser.
In recent versions of Idea Community (about 2017.3, but I am not sure) there is no Database tool available anymore, only in Idea Ultimate [1]. Yet worse, the plugin Database Navigator that would fit here to solve this problem is not compatible anymore, at least not with 2018.3 [2].
Uninstalling Idea right now, unfortunately.
[1] https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000411990-Database-option-not-available-under-View-Tool-Windows-in-Intellij-v2018-1-Community-Edition-
[2] https://intellij-support.jetbrains.com/hc/en-us/community/posts/360001759260-Dan-Cioacas-Database-Navigator-plugin-v3-0-8222-0-is-incompatible-with-latest-IntelliJ-IDEA-2018-3
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.
to download Drivers click on "Download missing Drivers" in bottom of the window.
if you want to add JDBC and connect other database vendor like workbench projects (instead of using intelliJ Consol) just follow the steps bellow :
Using JDBC drivers #
Create a connection to a database with a JDBC driver #
If you cannot find a name of a database vendor in the list of data sources, download a JDBC driver for the database management system (DBMS), and create a connection in IntelliJ IDEA. With the JDBC driver, you can connect to DBMS and start working.
In the Database tool window (View | Tool Windows | Database), click the Data Source Properties icon.
In the Data Sources and Drivers dialog, click the Add icon (+) and select Driver and Data Source.
Click the User Driver link.
In the Driver files pane, click the Add icon and select Custom JARs.
Navigate to the JAR file of the JDBC driver, select it, and click
OK.
In the Class field, specify the value that you want to use for the
driver.
Click Apply.
Return to the created data source connection.
Specify database connection details. Alternatively, paste the JDBC URL in the URL field.
To set an empty password, right-click the Password field and select Set empty.
To ensure that the connection to the data source is successful,
click Test Connection.
For more information read the official answer of Jetbrains in following link :
Configuring database connections
https://www.jetbrains.com/help/idea/configuring-database-connections.html#Configuring_database_connections.xml
For anyone who is having trouble connecting IntelliJ Community Edition with MySQL in 2021.
(In IntelliJ Ultimate Database connectivity is supported by default and you can follow the steps shown in the previous answers. However IntelliJ Community Edition does not support it by Default).
Here is what you have to do:
Install "Database Navigator" Plugin. (Settings->Plugins->Marketplace->Search Database
Navigator and install)
Open DB Browser Tab (next to the button that opens/closes Project Window) -> Click Options logo
-> '+' -> Fill the Database fields (Name, host, Port, DB Name, User and Password).
Download the MySQL Java Connector
by searching google for 'java connector mysql'.
Go to File->
Project Structure -> Modules-> Dependencies. Click the '+' on the right side and select 'JARs or directories'.
Navigate and find the Java connector you just downloaded (the file
looks like this: mysql-connector-java-8.0.26.jar). Click apply
and in the project window, under External Libraries, you will see
the .jar file.
For WebStorm you need plugin "database-navigator"
https://plugins.jetbrains.com/plugin/1800-database-navigator
I have 3 connections configured in the MySQL Workbench and lately as soon as I run the workbench I get this "Open SQL Script" dialog.
Steps:
1) Right click MySQL Notifier (1.1.4)
2) Click on "SQL Editor..."
3) Expected: Workbench Home (1 tab open)
Actual result: the tab for the 3rd connection is automatically open and on top of that I get this "Open SQL Script" dialog.
Additionally I would love to be able to change the default connection that opens, but I could not find any of this anywhere.
Help is appreciated! Thanks,
Simon
Take a closer look where you are clicking in MySQL Notifier. For each instance MySQL Workbench (and hence MySQL Notifier) found there's a separate menu entry which you can use to open the application for. The notifier is just trying to help you to get quicker to some standard work. If you just want to open MySQL Workbench then don't use the notifier. Create a shortcut for it and put in a good place instead.
Update
In order to clarify look at this image:
As you can see there's more than one "SQL Editor..." entry (one for each connection in MySQL Workbench). But even if you only have one connection, the menu entry "SQL Editor..." is meant to open ... well... the SQL editor. In addition it asks for an SQL file you may want to open. That's just how it is designed. If you don't want that click Cancel. There's no dedicated menu entry to just open MySQL Workbench with the home screen. If you want that better place a shortcut to the application on your desktop.
Regarding a "default connection": there's no such thing as a default connection. You can pass in a connection name on the command line if you want to open a specific connection. You can use the shortcut you can create and add the parameter "-query " to it.
The request failed or the service did not respond in a timely fashion. consult the event log or other applicable error logs for details.
I have tried these solution but it didn't work for me.
Disable VIA
Change the Reporting Service account
I also tried with different settings for following:
Go to Start > Run > and type regedit
Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
With the control folder selected, right click in the pane on the right and select new DWORD value
Name the new DWORD: ServicesPipeTimeout
Right-click ServicesPipeTimeout, and then click Modify
Click Decimal, type 180000, and then click OK
Restart the computer
I recently installed mysql5.5 to my Windows 7 (x64) machine. The first problem was I couldn't enter the cmd client with mysql -u root -pmypass. The cmd opens, yields an error for like 0.5s and closes. Than I created another user account with all privileges, it worked and I created a database. But now I want to export that database from MySQL Workbench but I cannot see that in the "select a schema" option. I tried "new connection" and "new server instance" none worked.
Any suggestions?
Thanks in advance..
For the command line use WB too. In the list of connections you can right click for the context menu, which also offers to open a CLI window. In general, when you work with the CLI first open a normal CLI window (Start Menu -> Programs -> Accessories) and then try the mysql -u -p command. This way the CLI window won't close immediately and you can see what error message came out.
For WB: if you don't see a schema you know is there then probably the user you used to connect has no permissions to see it. So for tests try connecting as root and see if your schema is there. Import and Export of db objects (including entire schemas) is available in the admin section, not in the SQL IDE (where you found "Edit Table Data" etc.).