最近在使用mysql的文檔存儲方式,須要使用mysqlsh命令行,可是默認的Debian系統沒有mysqlsh的安裝源,因此只能本身添加apt安裝源,對mysqlsh命令行進行安裝。html
https://dev.mysql.com/downloads/repo/apt/mysql
apt-get install lsb-release wget
dpkg -i mysql-apt-config_0.8.13-1_all.deb
先進行更新準備:linux
apt-get update
再進行安裝:sql
apt-get install mysql-shell
安裝提示:shell
MySQL APT Repo features MySQL Server along with a variety of MySQL components. You may select the appropriate product to choose the version that you wish to receive. Once you are satisfied with the configuration then select last option 'Ok' to save the configuration, then run 'apt-get update' to load package list. Advanced users can always change the configurations later, depending on their own needs. 1. MySQL Server & Cluster (Currently selected: mysql-8.0) 2. MySQL Tools & Connectors (Currently selected: Enabled) 3. MySQL Preview Packages (Currently selected: Disabled) 4. Ok Which MySQL product do you wish to configure? 4
這裏選者4便可。bash
root@5f29020b36c0:/# mysqlsh -V Logger: Tried to log to an uninitialized logger. mysqlsh Ver 8.0.17 for Linux on x86_64 - for MySQL 8.0.17 (MySQL Community Server (GPL))