PyCharm: configure MySQL DB using "pipe"



I am using a Windows 7 machine as a development platform for the moment.  I am running the latest PyCharm and am working on a python/Django project.  I have a local instance of MariaDB running but it is NOT using networking.  It is accepting connections through a named pipe/socket.

PyCharm keeps prompting me to configure data sources for this project but the MySQL and MaeiaDB dialogues only seem to support hostname and port number options.  Is there a way to have Pycharm either accept the named pipe I have setup or have it read the "my.cnf" config file that I have?


Same thing for PhpStorm: need named pipe connection option for MySQL on Windows 10.

Yuriy Vinogradov

Please read this article , here are the instructions how to make connection with JDBC driver and pipes.

To  find socketFactory propertie please go to DataSource properties -> Advanced.



Yuriy, I followed the instructions and now I get an error:

[08S01][1043] Bad handshake.

Here are the exact steps I've made:

1. Open the data source's properties
(go to main menu, open View -> Tool Windows -> Database, select the source, press Shift+Enter)

2. In the General tab enter the following URL value: 


3. In the Advanced tab find socketFactory property and set it's value to


4. Press Test Connection. Ends up with the error.

You can see all the steps on the screenshots:

I use latest version of PhpStorm (2021.2.3 at the time), latest verison of MySQL Connector/J (8.0.25 at the time) and MySQL Server 8.0.22.
(In the tool window MySQL Server's version somewhy shows up as 5.7.26, which is wrong and likely comes from partially successful connection tries in the past.)

The server instance itself is 100% fine: I connect to it via the pipe with various other clients on a regular basis.


I've read the instruction.

Eventually changes I had to make come down to these:

1. Set Host field value to


2. Set URL field value to


(It actually sets up automatically if you clear the field before setting Host value)

I'm still getting the same "[08S01][1043] Bad handshake" error.


I've also tried values without (path=\\.\pipe\MySQL) in both fields. Still no good.


Also I wasn't able to complete step 4 of the instruction:

On the Advanced tab, find the serverTimezone parameter in the list of options. Double-click the Value cell and type your server timezone (for example, UTC).

Because there is no such variable in the list (sessionVariables goes immediately after serverRSAPublicKeyFile).



Please set 'Connection type' to 'Unix socket' here


Please set 'Connection type' to 'Unix socket' here

Will this work on Windows 10 machine?


Please set 'Connection type' to 'Unix socket' 

What value should I set the URL field to? It stays the same after I changed the connection type, but it apparently shouldn't be like that.


Yes my bad, it won't work on Windows.

Please try to switch driver to 'MySQL for 5.1' or use any other version of 8.x.

BTW what is the usecase for pipe connection? Don't you want to enable TCP/IP?


Please try to switch driver to 'MySQL for 5.1' or use any other version of 8.x.

No good. Yields whether the same error or even worst ones.

BTW what is the usecase for pipe connection?

All database server's clients run at the same machine, so there is no need of any network connections.

Don't you want to enable TCP/IP?

No, I don't, because it decreases security. 
There is actually no reason for that except JetBrains not working properly.


I wonder if there is anyone in JetBrains team who actually does have installation of MySQL server on Windows (standalone, not in Docker) and can reproduce steps I make.


Have you set up MySQL properly to accept piped connections?


Have you set up MySQL properly to accept piped connections?

Yes, I have.

I connect to it via pipe with various clients: PHP, mysql command line client, MySQL Workbench.

All of them work fine.


Could you share output for



mysql> SHOW GLOBAL VARIABLES LIKE 'named_pipe';
| Variable_name | Value |
| named_pipe    | ON    |
1 row in set (0.00 sec)

I see, it looks like an issue then. Could you file an issue in DataGrip YouTrack?


Make sure you've configured your MySQL server correctly since I can't reproduce the issue.

Please, follow the instruction but skip serverTimeZone section.


Please sign in to leave a comment.