Can't connect to MySQL server on 'localhost' (10061) after Installation

后端 未结 30 2846
予麋鹿
予麋鹿 2020-12-13 00:08

I installed MySQL using mysql-installer-5.5.20.0.msi on Windows 7. From the cmd window, I run \"mysqlshow -u root -p\". It asked for a password, then return

相关标签:
30条回答
  • 2020-12-13 00:26

    Don't do useless stuff like reconfigure, stop MySQL and start MySQL in service. Just reinstall the MYSQL server and again install it in your system. Remember only uninstall MySQL server and nothing else. All the problem will be solve automatically

    0 讨论(0)
  • 2020-12-13 00:27

    I had the same error. I resolved in this way

    Go to start- MySQL Installer-community and run again the installer as a re-configuration(you will be asked so).

    Once asked if you want make MySQL instance to run as a Windows service, check the box.

    In case would do not work, try unistalling and installing again, and check the box to run MySQL as Windows service.

    0 讨论(0)
  • 2020-12-13 00:28

    I solved this by adding the following arguments to the command line string:

    mysql --user username --password password --host localhost --port 3306 databasename < "system path to .sql file"
    

    Without the --host and --port arguments, especially if you change the port to let's say 3307, which is a non default value, will cause this error.

    0 讨论(0)
  • 2020-12-13 00:28

    This saved my life,

    mysqld --tc-heuristic-recover=ROLLBACK
    

    Read more

    0 讨论(0)
  • 2020-12-13 00:29

    The simple solution that worked for me is: change localhost to 127.0.0.1 in your database.yml or in your script if writing one.

    0 讨论(0)
  • 2020-12-13 00:29

    For the 5.7 version, I had the same problem and a simple fix did the trick. As Installed the workbench 5.7 there was another "software" of sorts called the "MySQL Installer Community". I ran this and ran the "Reconfigure" for the MySQL server. It took about a minute and the problem was no longer there.

    Hope it works!.(Keep in mind i was using the 5.7 version)

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