指定端口使用大寫的-P指定:
mysql -P 3360 -u root -p
以前的連接方式 mysql -p3360 -u root -p 連不上了:
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -p3360 -u root -p
mysql: [Warning] Using a password on the command line interface can be insecure.
Enter password: **************
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
從今天開始指定端口切到大寫-P,小寫-p只用於密碼。