ERROR 2003 (HY000): Can't connect to MySQL server on localhost (10061)

后端 未结 26 1972
Happy的楠姐
Happy的楠姐 2020-12-23 02:37

I installed MySQL on Microsoft Windows 8 Using a noinstall Zip Archive. But when i tested by executing the following commands on windows prompt, the above error showed up.<

相关标签:
26条回答
  • 2020-12-23 02:48

    i also face the same problem. try it

    1. Go to bin directory copy the path and set it as a environment variable.
    2. Run the command prompt as admin and cd to bin directory:
    3. Run command : mysqld –install
    4. Now the services are successfully installed
    5. Start the service in service windows of os
    6. Type mysql and go
    0 讨论(0)
  • 2020-12-23 02:48
    1. First make sure you have installed MYsql+Sqlyog(if you are using it.).

      • Start Registry Editor (Regedt32.exe).
    • Locate the following key in the registry:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters On the Edit menu, click Add Value, and then add the following registry value:

         Value Name: MaxUserPort
         Data Type: REG_DWORD
         Value: 65534
      

      This sets the number of ephemeral ports available to any user. The valid range is between 5000 and 65534 (decimal). The default value is 0x1388 (5000 decimal).

      On the Edit menu, click Add Value, and then add the following registry value:

         Value Name: TcpTimedWaitDelay
         Data Type: REG_DWORD
         Value: 30
      

      This sets the number of seconds to hold a TCP port connection in TIME_WAIT state before closing. The valid range is between 30 and 300 decimal, although you may wish to check with Microsoft for the latest permitted values. The default value is 0x78 (120 decimal).

      Quit Registry Editor.
      
      Reboot the machine.
      
    0 讨论(0)
  • 2020-12-23 02:50

    Had this issue in Windows 10 and MySQL 8. Resolved by following steps: Searchbar(bottom left) > Task Manager > Run as administrator > Services > MySQL80

    0 讨论(0)
  • 2020-12-23 02:51

    Go to Run type services.msc. Check whether MySQL services is running or not. If not, start it manually.

    0 讨论(0)
  • 2020-12-23 02:51

    I had the same problem. I tried all of the answers above (and some from other websites). In the end, my issue was that my cache wasn't configured. I found that info in my error log and fixed it by changing the line in the file:

    C:\MAMP\bin\apache\conf\extra\http-ssl.conf

    There I removed the double quotes from the line:

    SSLSessionCache "shmcb:/some/example/path/ssl_scache(512000)"

    to:

    SSLSessionCache shmcb:/some/example/path/ssl_scache(512000)

    and saved with Ctrl+S and closed the file.

    Here's the link that helped me: https://wiki.apache.org/httpd/SSLSessionCache

    0 讨论(0)
  • 2020-12-23 02:51

    In my case, which was a manual install using the .zip file. I solved this by specifying the nonstandard MySQL and Data install locations in a my.ini. https://dev.mysql.com/doc/refman/8.0/en/windows-create-option-file.html

    Then I needed to run the data directory initialisation commands: https://dev.mysql.com/doc/refman/8.0/en/data-directory-initialization-mysqld.html

    Then running: net start mysql

    0 讨论(0)
提交回复
热议问题