Not seeing how to format .sql files for MySQL

We're using MySQL 5.5 but PHPStorm isn't highlighting certain keywords like NEW (like MySQL Workbench does), and I'm not seeing how to make it understand a specific database technology and version number.


Did you add a database connection in PhpStorm to let it know about existing DB objects?

Try setting resolution scopes at File | Settings | Languages & Frameworks | SQL Resolution Scopes. You can also check out our Help articles on this: 


If none of the above helps please attach screenshots that would illustrate the issue


The forum has appended a space at the end of the link, here's the correct one:
Also, answering one of your questions, SQL dialect are not specific to certain DB versions, unfortunately, so they only provide features relevant for the last version.


It looks like PHPStorm supports switching to the latest MySQL 5 understanding here:

Am I correct in my assertion? I hope I'm doing this correctly!


Oh I just noticed when I selected Latest 5, it just selects 5.1.47... but we're using 5.5, so that won't be good enough.

I read that MySQL 8 supports 5.5, but the problem is that with PHPStorm only supporting up to 5.5, 5.1 will not be aware of enough features for good syntax reading, and 8 will not notify me of things incompatible with 5.5... Very disappointing.

Since the Connector appears to be coming from Java, is there a connector I can download and plug in for 5.5 or other 5.x versions?


Pardon me for posting again, I found this:

It says "MySQL Connector/J 8.0 is highly recommended for use with MySQL Server 8.0, 5.7, 5.6, and 5.5."... so I will use that.

Maybe I'm just not aware of how this works with PHPStorm... I figured this would allow syntax validation, but maybe I'm not understanding or fully aware of what this actually will do in the programming environment.


Newer connector versions let PhpStorm introspect the DB making it aware of built-in functions and such stuff, but not affecting actual inspections - here's an example when it doesn't help:


That link says 404: Nope, can't find it!



Sorry, there were limited permissions set on this issue due to uploaded logs and exposed SQL query. So, I changed the sample query and hide logs/screenshot and made this issue open to everyone.

Please try again.


Please sign in to leave a comment.