mysql shell的使用
1,打开
C:\Program Files\MySQL\MySQL Shell 8.0\bin\mysqlsh.exe
2,
MySQL JS > \?
3连接命令
\? \connect
\c root:thiismiismypassword@localhost:3306
4回应连接命令Creating a session to 'root@localhost:3306'
Fetching schema names for autocompletion... Press ^C to stop.
Your MySQL connection id is 16
Server version: 8.0.19 MySQL Community Server - GPL
No default schema selected; type \use to set one.
产生一个会话
产生一个连接的id
是16
服务器版本是8.0.19
5左边的变长了
变化之前:
MySQL JS > \?
然后,
MySQL localhost:3306 ssl JS >
6
学习sql语法
MySQL localhost:3306 ssl JS > \? Char
[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE
collation_name]
A fixed-length string that is always right-padded with spaces to the
specified length when stored. M represents the column length in
characters. The range of M is 0 to 255. If M is omitted, the length is
1.
*Note*:
Trailing spaces are removed when CHAR values are retrieved unless the
PAD_CHAR_TO_FULL_LENGTH SQL mode is enabled.
URL: https://dev.mysql.com/doc/refman/8.0/en/string-type-overview.html
命令行工具是什么?
就好像我们聊天
我发送一句话
你回我一句话
我发送一句话
你回我一句话
我发送一条有语法的命令
你返回我想要的内容
使用书和使用软件的区别。
1,书是不会互动的。
我从第一页,到第二页。
到第三页。
都是我在翻书。
2,程序是互动的
我想看什么,我输入什么,他就返回什么。
他能跟我互动。
灵活。
交互性强。
交互性强。
交互性强。