MySQL Shell 8的安装
原创
©著作权归作者所有:来自51CTO博客作者Expect_lei的原创作品,请联系作者获取转载授权,否则将追究法律责任
##1. 下载
https://dev.mysql.com/downloads/shell/
下载对应版本的即可
##2. 安装
###2.1. 上传文件
[root@storage1 software]# ll
###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 'root@127.0.0.1:3306'
Please provide the password for 'root@127.0.0.1:3306': ****
Save password for 'root@127.0.0.1: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