C:\Users\administrator>mysql -h127.0.0.1 -P9306 -uroot -pzs_20220101
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 8.0.28 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> quit
Bye
错误
错误:端口错误-错误2003 (HY000):无法连接到MySQL服务器上的'127.0.0.1:8306' (10061)
C:\Users\administrator>mysql -h127.0.0.1 -P8306 -uroot -pzs_20220101
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:8306' (10061)
错误:密码错误-错误1045(28000):用户“root”@“localhost”的访问被拒绝(使用的密码:YES)
C:\Users\administrator>mysql -h127.0.0.1 -P9306 -uroot -pys_20221101
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)