Can PhpStorm dump a MySQL database into a sql file?
No, in phpstorm there is no such option.
You only can export single Tables from the Database by clicking on ONE single Table (doesn't work if you mark more than one Table) and open Mouse-Menu (right mouseclick). There you choose "Save to File..." an Choose what you need (for example " SQL Insert Statements".
For having a good DB-Client to manage the whole Stuff, use DBeaver (Standalone Version), or MysqlWorkbench.I preffer DBeaver.
As far as I know, you can export data from tables. Some types of database allows you to Copy DDL
of any node.
More at