更多文章,欢迎关注作者公众号,欢迎一起交流。
1 MySQL Shell 安装
1)下载安装文件,并上传至数据库服务器
[root@serverc ~]# ls mysql-shell-commercial-8.0.28-linux-glibc2.12-x86-64bit.tar.gz
mysql-shell-commercial-8.0.28-linux-glibc2.12-x86-64bit.tar.gz
2)解压缩至 /usr/local/ 目录
[root@serverc local]# cd /usr/local/
[root@serverc local]# tar zxvf /root/mysql-shell-commercial-8.0.28-linux-glibc2.12-x86-64bit.tar.gz
[root@serverc local]# ln -s mysql-shell-commercial-8.0.28-linux-glibc2.12-x86-64bit/ mysql-shell
3)增加环境变量至.bash_profile文件
[root@serverc local]# echo "export PATH=$PATH:/usr/local/mysql-shell/bin" >> /root/.bash_profile
[root@serverc local]# . /root/.bash_profile
4)启动MySQL Shell检查安装和路径配置
[root@serverc local]# mysqlsh
MySQL Shell 8.0.28-commercial
Copyright (c) 2016, 2022, 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 &