Skip to end of metadata
Go to start of metadata

In addition to neat SQL support IntelliJ IDEA offers you a set of tools to connect to a database, browse and alter table data, run queries and manage schema structure.

Redirection Notice

Icon

This tutorial describes how to connect to a database from IntelliJ IDEA 13, PhpStorm 7.1, PyCharm 3.1 and RubyMine 6.

1. Open the Database tool window

To access a database you have to configure a data source. To see the list of data sources or configure a new one you need the Database tool window. If this window is not visible use the button in the left bottom corner to open it.

2. Create a data source

To configure a data source, use the New button on the toolbar. You'll be asked you to choose a data source type from the list.

3. Download the driver

If you configure a data source for the first time, IntelliJ IDEA hasn't downloaded the driver yet. Just press the Download button and the IDE will do everything automatically.

Note that all the other settings for the connection you can specify on the Advanced tab.

4. Specify host, port and credentials

The driver is set, so you can specify the host, port, database and credentials for the data source.

As you'll see the IDE automatically composed the connection URL based on the settings. However you can always override it via the corresponding field.

You may also notice that the dialog has two checkboxes in the bottom: Read-only and Auto sync. As you might guess the Read-only checkbox protects the data source from any changes. This is especially useful if you work with a production database. The Auto sync checkbox prevents the IDE from automatic synchronizations with the database. This might be useful when the connection is not good or when the database has too many objects.

5. Test connection

To make sure the data source connection settings are correct, click the Test Connection button.

6. Select schemas

Now you can select schemas to show in list via the Scan for Tables column on the Schemas & Tables tab. Make also sure to select the corresponding schemas using Make Default column if you'd like to access its tables without a schema prefix.

When you configure a data source, you can specify its scope. The default scope is the Project. However, if you'd like to work with the data source from more than one project, than you have to select the IDE scope.

When you are done with the data source setting click the OK button.

Once the data source is configured, you can work with it as through a full-featured database client: run queries, browse and alter table data, manage schema, etc.

  • No labels

9 Comments

  1. Anonymous

    when i test the connection , i have errors.

    With mySql i have : 

    Connection to MySQL - test@localhost failed
    java.sql.SQLException: Communications link failureConnection to MySQL - test@localhost failed
    java.sql.SQLException: Communications link failure

    With Oracle i have :
    java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

    can anyone help me ?

    1. Anonymous

      is mysql running? 

      is there any firewall running?

      does test user has permissions to access db?

    2. Anonymous

      You need to make sure if your mysql server start firstly.

      sudo /usr/local/mysql/support-files/mysql.server start

  2. Anonymous

    The same error happend to me:

    Caused by: java.lang.RuntimeException: oracle.net.ns.NetException: Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
    Caused by: java.lang.RuntimeException: oracle.net.ns.NetException: Listener refused the connection with the following error:

    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

    Anybody solve this problem?

    1. Anonymous

      What is your connection string?

  3. Anonymous

    can anyone share with me how to connect to MSSQL Express 2012 from intellij idea.

    I keep getting a message that says : "The driver is not configured for integrated authentication..."

    Below is the entire message thread:

    Connection to SQL Server - test@localhost failed
    java.sql.SQLException: This driver is not configured for integrated authentication. ClientConnectionId:39cbb00a-3b7a-4c53-a85a-ee718944a8a7
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
      at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:60)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
      at com.intellij.persistence.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
      at sun.rmi.transport.Transport$1.run(Transport.java:177)
      at sun.rmi.transport.Transport$1.run(Transport.java:174)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
      at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
      at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
      at com.sun.proxy.$Proxy110.connect(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.intellij.execution.rmi.RemoteUtil$RemoteInvocationHandler.invoke(RemoteUtil.java:214)
      at com.sun.proxy.$Proxy111.connect(Unknown Source)
      at com.intellij.javaee.module.view.dataSource.LocalDataSource.getConnection(LocalDataSource.java:247)
      at com.intellij.javaee.module.view.dataSource.LocalDataSource.getConnection(LocalDataSource.java:223)
      at com.intellij.javaee.dataSource.DataSource.getConnection(DataSource.java:319)
      at com.intellij.javaee.dataSource.DataSource.performJdbcOperation(DataSource.java:357)
      at com.intellij.javaee.dataSource.AbstractDataSource.refreshMetaData(AbstractDataSource.java:32)
      at com.intellij.javaee.module.view.dataSource.DataSourceUiUtil$2.run(DataSourceUiUtil.java:177)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
      at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:380)
      at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
    Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path
      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
      at java.lang.Runtime.loadLibrary0(Runtime.java:849)
      at java.lang.System.loadLibrary(System.java:1088)
      at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:35)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
      at com.intellij.persistence.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
      at sun.rmi.transport.Transport$1.run(Transport.java:177)
      at sun.rmi.transport.Transport$1.run(Transport.java:174)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
    Connection to SQL Server - test@localhost failed

    java.sql.SQLException: This driver is not configured for integrated authentication. ClientConnectionId:39cbb00a-3b7a-4c53-a85a-ee718944a8a7

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)

      at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:60)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)

      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)

      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)

      at com.intellij.persistence.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

      at sun.rmi.transport.Transport$1.run(Transport.java:177)

      at sun.rmi.transport.Transport$1.run(Transport.java:174)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)

      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)

      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)

      at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)

      at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)

      at com.sun.proxy.$Proxy110.connect(Unknown Source)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at com.intellij.execution.rmi.RemoteUtil$RemoteInvocationHandler.invoke(RemoteUtil.java:214)

      at com.sun.proxy.$Proxy111.connect(Unknown Source)

      at com.intellij.javaee.module.view.dataSource.LocalDataSource.getConnection(LocalDataSource.java:247)

      at com.intellij.javaee.module.view.dataSource.LocalDataSource.getConnection(LocalDataSource.java:223)

      at com.intellij.javaee.dataSource.DataSource.getConnection(DataSource.java:319)

      at com.intellij.javaee.dataSource.DataSource.performJdbcOperation(DataSource.java:357)

      at com.intellij.javaee.dataSource.AbstractDataSource.refreshMetaData(AbstractDataSource.java:32)

      at com.intellij.javaee.module.view.dataSource.DataSourceUiUtil$2.run(DataSourceUiUtil.java:177)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)

      at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:380)

      at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)

      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

      at java.util.concurrent.FutureTask.run(FutureTask.java:262)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

      at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

    Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path

      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)

      at java.lang.Runtime.loadLibrary0(Runtime.java:849)

      at java.lang.System.loadLibrary(System.java:1088)

      at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:35)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)

      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)

      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)

      at com.intellij.persistence.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

      at sun.rmi.transport.Transport$1.run(Transport.java:177)

      at sun.rmi.transport.Transport$1.run(Transport.java:174)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

    Connection to SQL Server - test@localhost failed

    java.sql.SQLException: This driver is not configured for integrated authentication. ClientConnectionId:39cbb00a-3b7a-4c53-a85a-ee718944a8a7

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)

      at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:60)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)

      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)

      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)

      at com.intellij.persistence.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

      at sun.rmi.transport.Transport$1.run(Transport.java:177)

      at sun.rmi.transport.Transport$1.run(Transport.java:174)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)

      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)

      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)

      at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)

      at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)

      at com.sun.proxy.$Proxy110.connect(Unknown Source)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at com.intellij.execution.rmi.RemoteUtil$RemoteInvocationHandler.invoke(RemoteUtil.java:214)

      at com.sun.proxy.$Proxy111.connect(Unknown Source)

      at com.intellij.javaee.module.view.dataSource.LocalDataSource.getConnection(LocalDataSource.java:247)

      at com.intellij.javaee.module.view.dataSource.LocalDataSource.getConnection(LocalDataSource.java:223)

      at com.intellij.javaee.dataSource.DataSource.getConnection(DataSource.java:319)

      at com.intellij.javaee.dataSource.DataSource.performJdbcOperation(DataSource.java:357)

      at com.intellij.javaee.dataSource.AbstractDataSource.refreshMetaData(AbstractDataSource.java:32)

      at com.intellij.javaee.module.view.dataSource.DataSourceUiUtil$2.run(DataSourceUiUtil.java:177)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)

      at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:380)

      at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)

      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

      at java.util.concurrent.FutureTask.run(FutureTask.java:262)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

      at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

    Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path

      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)

      at java.lang.Runtime.loadLibrary0(Runtime.java:849)

      at java.lang.System.loadLibrary(System.java:1088)

      at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:35)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)

      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)

      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)

      at com.intellij.persistence.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

      at sun.rmi.transport.Transport$1.run(Transport.java:177)

      at sun.rmi.transport.Transport$1.run(Transport.java:174)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

    Connection to SQL Server - test@localhost failed

    java.sql.SQLException: This driver is not configured for integrated authentication. ClientConnectionId:39cbb00a-3b7a-4c53-a85a-ee718944a8a7

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)

      at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:60)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)

      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)

      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)

      at com.intellij.persistence.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

      at sun.rmi.transport.Transport$1.run(Transport.java:177)

      at sun.rmi.transport.Transport$1.run(Transport.java:174)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)

      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)

      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)

      at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)

      at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)

      at com.sun.proxy.$Proxy110.connect(Unknown Source)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at com.intellij.execution.rmi.RemoteUtil$RemoteInvocationHandler.invoke(RemoteUtil.java:214)

      at com.sun.proxy.$Proxy111.connect(Unknown Source)

      at com.intellij.javaee.module.view.dataSource.LocalDataSource.getConnection(LocalDataSource.java:247)

      at com.intellij.javaee.module.view.dataSource.LocalDataSource.getConnection(LocalDataSource.java:223)

      at com.intellij.javaee.dataSource.DataSource.getConnection(DataSource.java:319)

      at com.intellij.javaee.dataSource.DataSource.performJdbcOperation(DataSource.java:357)

      at com.intellij.javaee.dataSource.AbstractDataSource.refreshMetaData(AbstractDataSource.java:32)

      at com.intellij.javaee.module.view.dataSource.DataSourceUiUtil$2.run(DataSourceUiUtil.java:177)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)

      at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:380)

      at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)

      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

      at java.util.concurrent.FutureTask.run(FutureTask.java:262)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

      at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

    Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path

      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)

      at java.lang.Runtime.loadLibrary0(Runtime.java:849)

      at java.lang.System.loadLibrary(System.java:1088)

      at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:35)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)

      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)

      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)

      at com.intellij.persistence.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

      at sun.rmi.transport.Transport$1.run(Transport.java:177)

      at sun.rmi.transport.Transport$1.run(Transport.java:174)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

    Connection to SQL Server - test@localhost failed

    java.sql.SQLException: This driver is not configured for integrated authentication. ClientConnectionId:39cbb00a-3b7a-4c53-a85a-ee718944a8a7

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)

      at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:60)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)

      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)

      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)

      at com.intellij.persistence.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

      at sun.rmi.transport.Transport$1.run(Transport.java:177)

      at sun.rmi.transport.Transport$1.run(Transport.java:174)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)

      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)

      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)

      at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)

      at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)

      at com.sun.proxy.$Proxy110.connect(Unknown Source)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at com.intellij.execution.rmi.RemoteUtil$RemoteInvocationHandler.invoke(RemoteUtil.java:214)

      at com.sun.proxy.$Proxy111.connect(Unknown Source)

      at com.intellij.javaee.module.view.dataSource.LocalDataSource.getConnection(LocalDataSource.java:247)

      at com.intellij.javaee.module.view.dataSource.LocalDataSource.getConnection(LocalDataSource.java:223)

      at com.intellij.javaee.dataSource.DataSource.getConnection(DataSource.java:319)

      at com.intellij.javaee.dataSource.DataSource.performJdbcOperation(DataSource.java:357)

      at com.intellij.javaee.dataSource.AbstractDataSource.refreshMetaData(AbstractDataSource.java:32)

      at com.intellij.javaee.module.view.dataSource.DataSourceUiUtil$2.run(DataSourceUiUtil.java:177)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)

      at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)

      at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:380)

      at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)

      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

      at java.util.concurrent.FutureTask.run(FutureTask.java:262)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

      at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

    Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path

      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)

      at java.lang.Runtime.loadLibrary0(Runtime.java:849)

      at java.lang.System.loadLibrary(System.java:1088)

      at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:35)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)

      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)

      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)

      at com.intellij.persistence.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

      at sun.rmi.transport.Transport$1.run(Transport.java:177)

      at sun.rmi.transport.Transport$1.run(Transport.java:174)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      at java.lang.Thread.run(Thread.java:745)

  4. Anonymous

    Very useful for me

  5. Anonymous

    I cannot perform SELECT operation from MySQL DB - result is empty.

  6. Anonymous

    When I connect to MySQL database from MySQL Workbench, it doesn't ask for any password, where as I connect to it from Intelli Idea and do a test connection, it says empty username/password is not accepted.  How can I circumvent this to connect to a test database?