Current schema is not being updated




i'm having issue with this for very long time. Anytime i change the schema in the editor, current schema is not being updated and there is nothing i can do about it.


I have tried deleted product and everything related to product in ~/Library/...


I'm using latest version of DataGrip currently 2017.3.3 and i'm on mac 10.12.6


Please review my image:



Thank you!



DataGrip sets "Current Database" for current session user according to:

select database()

query. If you want explicitly change current schema use:

use <your_database>

Thank you.


Hi Vasily,

but this doesn't really make sense if you look at my picture attached and what query is being executed by the Data Grip when i change context.


Is there a way to have current schema change based on how i am doing it in the screenshot ?




I have the same issue as Milos.

vasily chernov:
> DataGrip sets "Current Database" for current session user according to:

This is not the behaviour I'm seeing.

DataGrip is stuck reporting the Current Schema as information_schema for myself.  This is irrespective of what SELECT DATABASE() reports and what is shown as the selected schema at the top-right of a console.

This is annoying because I assume that if I check Current Schema as a schema to introspect that DataGrip would automatically introspect a schema when I make it my current schema.  But because Current Schema is fixed to information_schema this does not happen.

It also gets a little nerve racking because at times when looking at the documentation for a resource, it will show the table from Current Schema and not my current schema.  So I start to worry about which schema my DML query will actually run against when DataGrip is providing conflicting information over which schema is actually the current schema.



The follow screen illustrates how the current schema is `mysql` whilst the Current Schema is reported as `information_schema`.

I have DataGrip on two different PCs, one running Windows and the other running Linux.  All with many connections to different servers and all of them have this problem of the Current Schema not reflecting the current schema.


Just to add, i have tested this again recently with fresh install of DataGrip 2018.1 and problem still persists.


I have opened issue on their issue tracker for this since it seems like this hasn't raised the attention of issue which for me is such a road block.


On shema tree in database tool window, one can see "current schema" for connection which is specified in connection settings or defaults on a server. 

Database and schema chooser on the top right corner of a console is for setting database/schema for the console. One can have some consoles with different database/schema for the same data source. So database and schema chooser for a console and schema tree are independent.



"one can see "current schema" for connection which is specified in connection settings ..."

I'm not specifying a database in the connections settings. And even when I do, the Current Schema does not reflect my connection settings.

"... or defaults on a server"

I'm using MySQL which doesn't have such a setting (that I'm aware of.) So I'm not clear on how DataGrip has chosen what my Current Schema is.

"So database and schema chooser for a console and schema tree are independent."

To help our understanding, if the Current Schema is intended to be independent of the console, then what is the purpose of Current Schema in the Schema Tree?


As a workaround, you can add your schema to your connection string. Redshift/Postgresql example:



For me "current schema" is always the first schema in the schema list, fairly annoying.