windows,cmd 登录MySQL

版权声明:本文为博主原创文章,转载请说明出处 https://blog.csdn.net/u010002184/article/details/82873639

要先切换到安装路径,

C:\Users\liuyazhou>mysql -u root -p
'mysql' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

C:\Users\liuyazhou>d:

D:\>cd D:\Program Files\mysql-5.7.23-winx64\bin

D:\Program Files\mysql-5.7.23-winx64\bin>mysql -u root -p
Enter password: ****
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.23 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> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

mysql>

猜你喜欢

转载自blog.csdn.net/u010002184/article/details/82873639