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

后端 未结 30 2849
予麋鹿
予麋鹿 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: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.

提交回复
热议问题