1. 程式人生 > >windows,cmd 登入MySQL

windows,cmd 登入MySQL

要先切換到安裝路徑,

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>