cmd输入
>mysql -u root -p
控制台报10061
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
连接不上数据库,猜测可能是端口号不对
>mysql --help > mysqlHelp.txt
输出mysql帮助,查询到添加端口号是-P
D:javatoolse-mysql>mysql -uroot -P 3307 -p
Enter password: **********
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 14
Server version: 8.0.13 MySQL Community Server - GPL
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
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>
登录成功
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)