MySQL Shell 8的安装

版权声明:未经博主允许不允许转载 https://blog.csdn.net/qianglei6077/article/details/86685487

##1. 下载

https://dev.mysql.com/downloads/shell/

下载对应版本的即可
##2. 安装
###2.1. 上传文件

[root@storage1 software]# ll
总用量 24528
-rw-r--r--. 1 root root 25115541 11月 21 10:35 mysql-shell-8.0.13-linux-glibc2.12-x86-64bit.tar.gz

###2.2. 解压,安装
解压到安装目录即可,我这里是/usr/local

[root@storage1 software]# tar -zxvf mysql-shell-8.0.13-linux-glibc2.12-x86-64bit.tar.gz -C /usr/local

做一下软连接或直接重命名文件夹名词,好看点

[root@storage1 local]# ln -s mysql-shell-8.0.13-linux-glibc2.12-x86-64bit mysqlsh8

###2.3. 配置环境变量

主要是方便使用

Vi /etc/profile

export PATH=/usr/local/mysqlsh8/bin/:$PATH

###2.4. 测试

连接数据库试试

[root@storage1 local]# mysqlsh 'root'@127.0.0.1:3306

Creating a session to '[email protected]:3306'
Please provide the password for '[email protected]:3306': ****
Save password for '[email protected]:3306'? [Y]es/[N]o/Ne[v]er (default No): yes  --保存密码
Fetching schema names for autocompletion... Press ^C to stop.
Your MySQL connection id is 4
Server version: 5.7.17 MySQL Community Server (GPL)
No default schema selected; type /use  to set one.
MySQL Shell 8.0.13
Copyright (c) 2016, 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 '/?' for help; '/quit' to exit.
 MySQL  127.0.0.1:3306  JS > 

更多关于MySQL Shell的使用,请查看官方文档:

https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-connections.html

猜你喜欢

转载自blog.csdn.net/qianglei6077/article/details/86685487