Data source name, Scope and the Test Connection button
|Data source name||Use this field to edit the name of the data source.|
|Test Connection||Click this button to make sure that the database connection settings are correct and PhpStorm can communicate with the target database. (This button is located in the lower-left part of the dialog.)|
|JDBC driver files||
Specify the JDBC driver to be used to interact with the database.
Use the list options to download the necessary driver files from the Internet (the corresponding option names include the word download), or select the driver files associated with a different data source (the <data source name> driver options).
If the corresponding driver files are available locally on your computer, click (Shift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift EnterShift EnterShift Enter) and select the driver file location(s) in the dialog that opens.
|JDBC driver class||Select the name of the class that implements the necessary JDBC driver. (The list includes all the driver classes detected in the specified driver files.)|
Specify the URL of the target database. For example, for a MySQL database the URL may look something similar to this:
<db_host> is the hostname (domain name) or the IP address of the computer on which the database is located,
Note that if SSH is used to access the database, the database host and port are specified in the Configure SSH Tunnel dialog. In this field, you should specify localhost or 127.0.0.1 in place of the target DB host and the local SSH port in place of the DB port.
Using the MySQL example above, you would specify
in this field.
To configure SSH access to the database, click Configure SSH.
|User||Specify the name of the database user (i.e. your database user account name).|
|Password||Specify the password for the database user.|
Select this check box to enable auto-synchronization of the data source view in the Database tool window.
As a result, the view will be automatically updated when you change the database properties or
run the corresponding DDL statements in the console.
Thus, you won't need to perform the Synchronize command
(Ctrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YAlt Command YAlt Command YAlt Command Y) for the corresponding database.
Note that auto sync is performed for the overall database and, thus, may be time-consuming. So auto-synchronization is more suitable for "small" databases. If your database is "big", it’s recommended that you sync its state manually (e.g. Ctrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YAlt Command YAlt Command YAlt Command Y), and only for the appropriate database parts such as separate tables.
If the target database should be accessed using SSH, click this button and
specify the associated settings in
the Configure SSH Tunnel dialog that opens.
See also, Database URL.
Schemas & Tables tab
In this tab, specify the schemas or table name patterns to restrict the set of accessible tables in the target databases.
Specifying a schema makes sense if the target database supports schemas.
|Schemas||This read-only field lists all the schemas that are currently available in the system.|
|Scan for Tables||Select the check boxes next to the schemes which you want to use for retrieving tables. If you select the check box next to *, tables will be scanned in all schemes.|
|Make Default||If you select this check box next to a schema, the names of the tables accessed through this schema will be resolved by PhpStorm so you do not need to write their fully qualified names.|
|Table Names Pattern||
In this text box, type a regular expression which determines the subset of accessible tables.
PhpStorm will access the tables with names that match the specified pattern.
An asterisk * means that all available tables will be loaded.
In this tab, configure the general behaviour of the Database Console tool window.
|Default SQL Dialect||From this drop-down list, select the SQL dialect to be used by default.|
|Default Run Configuration||In this drop-down list, specify the run configuration to launch the Database Console tool window.|
In this tab, configure the connection properties manually. This is necessary if your JDBC driver (for example, DB2) does not return the list of supported properties and therefore connection cannot be established successfully. To edit a parameter, click the Value field next to the desired parameter, and update the field contents as required.