Data sources in PHPStorm 3.0 Follow
Up until 3.0 I had Database URL defined as this
and when opening Database Source pane I had listed only databse called zlajo_andrea. But since 3.0 update this doesn't work as intended, since when I open Data Source panel I find all the databases on my sistem listed. Not a big problem but I just want to know is this a bug and report it, or am I doing something wrong?
Please sign in to leave a comment.
Compared to my string, the only difference is the port. I can't believe that would make a difference, but just in case here's my string: jdbc:mysql://localhost:3306/networkx2
This does work for me. On mac.
I've tried that before but putting port in URL string blocked whole PHPStorm and only way out was to kill the task.
Are you using root user/password?
For me in 3.0, Data Sources shows only the databases that the user/password has privelege to access.
The database url seems to ignore the /databasename portion of the string. In fact it works when that portion is removed entirley.
Everything is exactly the same as in 2.1.5 but it still shows all databases on localhost not the desired one.
<shrug>It may be that 3.0 behavior is is dirfferent.</shrug>
i origionaly thought they were "finaly" going the route of... declare all your database paths... in a global scope.. then per project you choose which database you want to use.. (woulda been cool instead of creating the string each time) but looks like this is a bug
This is not a bug but rather a feature.
Database name in MySQL JDBC URL is equivalent to "USE <database>" statement.
Even if you connect to a specific database you are able to switch to another one later using the aforementioned USE statement.
Use Data Source/Properties/Schemas & Tables tab to configure what part of the database to load/display in the view.
Gregory the thing that puzzles me is that I can not specify Data Source level to Project since the only option I have is greyed out as Global. I can only go Data Source/Properties/Schemas & Tables tab and specify my current database as default which then alters my other projects, because now the other database is defaulted for this project. Hence, the problem is that I can't specify Data Source level to Project.
To change the level just duplicate (Copy) the desired Data Source and select the level for the copy.
All the tables will be copied along with other properties. The original Data Source can be removed at any time.
Yup, this has solved the problem, but I still think that Project setting for database was the better solution. But I will have to live with this :)
my ideal is.. set up "global" servers.. like username / password and being able to connect... like now.. then per project you create a "database" link to 1 of the databases setup for your global envioronment..
say i have 2 MySQL servers... server1, server2.. in "global" i add connections to the 2 servers... since this is envionmental.
then when i create a project.. i go to data sources.. clcik new.. get a drop down of the servers (above) i select 1... then it lists all the databases in the server.. i select 1.. click ok.. and its done.. there should be an alternative tho aswell.. to create the string to the db like it was pre the last change.. i REALLY dont like the latest change to data sources.. its ilogical for me to have to set "make default" and "scan for tables" every time i change to another project... not even when i setup a project.. every time i want to work on another project
Please create feature request in our issue tracker with all these proposals.