Lightning: set a MySQL host IP and port instead of using socket (PhpStorm can't use socket)

Local Flywheel used host IP + port for the database server. Local Lightning uses a socket.

I was able to get the socket running for local Codeception tests (.env files), but PhpStorm’s Database tool window cannot use a socket because Storm is written in Java and Java can’t use sockets, per their Storm’s support, which wrote this back to me:

MySQL JDBC driver only supports TCP/IP and - on Windows - named pipes to connect to the database. Please see https://lists.mysql.com/java/8749.
So please enable networking in your MySQL server and use ‘localhost’ with port for connection.

Additional references:

So, please advise – maybe ‘localhost’ is sufficient, like wp-config.php seems good with but I need a different port#???

2 Likes

4 posts were merged into an existing topic: Connect phpStorm to Local “Lightning” database without supporting socket