Search code examples
mysqlconfigurationphpstorm

How to configure MySQL data source for PhpStorm?


I have a legacy PHP project using MySQL. PhpStorm discovers that there are MySQL queries inside the project, and asks me to provide a data source for them.

This opens this window:

Data Sources and Drivers for MySQL

Yet I am totally confused on how to provide the credentials to my MySQL database. I expected a mask to enter my MySQL host, username, password and target database name. Yet I cannot find this in here.

How to configure a MySQL data source in PhpStorm?


Solution

  • To create a new source for your projet, click on the green "+" icon and select mysql in the list of drivers. It should display fields for database info including username and password.

    Project Data source in PHPStorm