Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure DB Navigator for Jetbrains PHPStorm and WebStorm

I need to set up a connection in the DB Navigator plugin for PHPStorm in a mac (snow leopard). It asks me for the route of a library that implements the java.sql.Driver class. I just don't have any idea of where is it. Any advice?

like image 300
R01010010 Avatar asked Sep 15 '11 17:09

R01010010


People also ask

How do I show Database in Webstorm?

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. For more information about different viewing modes, see View data.

How do I use Database Navigator plugin?

Installing Database Navigator pluginOpen Setting dialogs and search for plugin: Select MarketPlace tab and type database: In the right panel (which shows Database Navigator) click on install and then click on restart IDE.

How add JDBC jar to Intellij?

In the file browser, 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.


3 Answers

Instructions

  1. Install DB Navigator Plugin via menubar >> Settings >> Plugins >> Available-Tab
  2. Download MySQL jdbc connector from here >> http://www.mysql.com/downloads/connector/j/
  3. Unpack MySQL jdbc connector to a directory of your choice
  4. Restart PHPStorm / WebStorm
  5. Add a DB via menubar >> DB Navigator >> Settings >> Connection-Tab >> Plus-Button
  6. Enter the parameters for your connection (see below for possible entries for a local MySQL DB)

Possible parameters for a local MySQL DB

  • Name: name of choice (localhost)
  • Description: additional info of choice (dbname)
  • Driver Library: path to the .jar file (that is the directory used in step 3)
  • Driver: preferred driver (most likely the standard driver will do >> com.mysql.jdbc.Driver)
  • URL: connection URL with a jdbc reference (e.g.: jdbc:mysql://localhost:3306/)
  • UserName: db username of choice (root)
  • Password: db password of choice (root)
like image 198
Bruiser Avatar answered Oct 18 '22 18:10

Bruiser


Just make sure you added jdbc:mysql:// before hostname. That solved my problem.

jdbc:mysql://my-db-url.com
like image 39
Mladen Janjetovic Avatar answered Oct 18 '22 19:10

Mladen Janjetovic


First of all, you don't need to install third-party DB Navigator plug-in, as database functionality is available in PhpStorm out of the box, see Tools | Data Sources.

Add new data source, it will allow to choose the database and the driver, and will download the required database drivers automatically.

like image 8
CrazyCoder Avatar answered Oct 18 '22 20:10

CrazyCoder