Cannot Connect to Database Server mysql workbench

后端 未结 5 1973
悲&欢浪女
悲&欢浪女 2021-01-06 11:28

I\'m trying to connect to mysql workbench but I get the following error

Error Message Cannot Connect to Database Server

Your connection attempt failed for us

相关标签:
5条回答
  • 2021-01-06 11:38

    I had the same issue a few days ago. As I could see in the original question, there has been multiple MySQL installation on the same computer - the same flow I tried after failing in the first attempt.

    In the case we are trying to reinstall MySQL, we should be aware of remaining hidden files after MySQL has been uninstalled for the first time. In order to remove them all (and make one successful installation), we should:

    1. Make hidden files visible on your computer (instructions)
    2. Delete all files related to MySQL after choosing uninstalling of the MySQL (I had to check C://ProgramData hidden folder)
    3. Try a new installation

    I think that during the first installation, I didn't have all required dependencies on the computer (for example Python) and the installation failed. After installing it, uninstalling the MySQL, and taking steps from above, I finally managed to run it successfully :)

    I hope this could help someone! :)

    0 讨论(0)
  • 2021-01-06 11:39

    I don't know if it helps anyone, but I had the same problem on windows after updating from MySQL 5.7 to 8.0.

    The solution for me was to go to services.msc, stop the MySQL service and start the "MySQL80" service instead.

    Then I restarted MySQL Workbench (run as admin) and it worked.

    0 讨论(0)
  • 2021-01-06 11:45

    This solved it for me (MAC OS)

    1. Open MySQL from System Preferences > Initialize Database >
    2. Type your new password.
    3. Choose 'Use legacy password'
    4. Start the Server again.
    5. Now connect the MySQL Workbench
    0 讨论(0)
  • 2021-01-06 11:57

    I faced similar issue and resolved it by following these steps:

    1. In the terminal, execute this command mysql -u root -p -h localhost -P 3306
    2. Enter the password
    3. This will be displayed Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 18 Server version: 8.0.16 Homebrew
    4. Now do, ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
    5. Now you should be able to login and connect to DB in the workbench with password 'root'
    0 讨论(0)
  • 2021-01-06 12:00

    Please make sure that You have Downloaded MySQl server while dowloading MySQl workbench from MySQl installer (if you have checked Custom download)

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