MySQL Shell 使用报错 SyntaxError: Unexpected identifier

文章目录

  • 一、问题报错
  • 二、解决办法

一、问题报错

MySQL Shell 8.0.23

Copyright (c) 2016, 2021, 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 '\?' for help; '\quit' to exit.
 MySQL  JS > select version();
SyntaxError: Unexpected identifier

二、解决办法

  • \connect root@localhost
  • js且sql,\slq
 MySQL  SQL > \connect root@localhost
Creating a session to 'root@localhost'
Please provide the password for 'root@localhost': ******
Save password for 'root@localhost'? [Y]es/[N]o/Ne[v]er (default No): y
Fetching schema names for autocompletion... Press ^C to stop.
Your MySQL connection id is 55 (X protocol)
Server version: 8.0.23 MySQL Community Server - GPL
No default schema selected; type \use <schema> to set one.
 MySQL  localhost:33060+ ssl  SQL > select version();
+-----------+
| version() |
+-----------+
| 8.0.23    |
+-----------+
1 row in set (0.0002 sec)

觉得好,就一键三连呗(点赞+收藏+关注)

你可能感兴趣的:(杂七杂八,MySQL,SyntaxError,conenct,root)