Mysql connection via named pipe

aikorsky's Avatar


13 Oct, 2016 09:08 AM


I can't connect to mysql server via named pipe.
OS returns "The system cannot find the file specified. (os error 2)".
Pipe name was taken from @@socket variable of running mysql instance so i hope it is correct.
Also this problem does not appear on my local machine.

Here is the build logs:

Is there a way to fix this?

  1. 1 Posted by Ilya Finkelshte... on 13 Oct, 2016 10:23 PM

    Ilya Finkelshteyn's Avatar


    I believe that problem is because named pipes are not enabled by default in standard MySQL installation. Please add the following (or equivalent if you do not like PowerShell) at install stage or anywhere before your tests.

    - ps: >-
        $iniPath="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini"
        $newText = ([System.IO.File]::ReadAllText($iniPath)).Replace("# enable-named-pipe", "enable-named-pipe")
        [System.IO.File]::WriteAllText($iniPath, $newText)
        Restart-Service MySQL57

    Please let us know if this helps.


  2. 2 Posted by aikorsky on 14 Oct, 2016 07:24 AM

    aikorsky's Avatar

    It works!
    Thanks a lot, Ilya.

  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:09 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac