MySQL Shell is an interactive JavaScript, Python, or SQL interface for MySQL Server and is a component that you can install separately. It can be installed on your Mac by using Homebrew or the official MySQL Shell package.
Homebrew
To install MySQL Shell using Homebrew, you need to install Homebrew on your Mac first. If you aren’t sure if you have installed Homebrew already, open your terminal and run the following command to check.
If you have, the terminal will display something like this:
Otherwise, run the following command to install Homebrew first:
On successful installation, your terminal will return a few new lines, with one of them stating:
Install MySQL Shell
To install MySQL Shell using Homebrew, run the following command in the terminal:
The installation will start shortly. You will know it's done when your Terminal returns the following lines:
Start MySQL Shell to verify the installation.
This output indicates that the installation was successful.
MySQL Shell package
The second way is to download the MySQL Shell for the macOS package.
Select the corresponding Operating System and OS Version of your Mac, and download the package.
Double-click the downloaded DMG file, a Finder window will show up.
Double-click to extract the .pkg file, and then follow the instructions as shown in the installation wizard.
When the installer finishes, it means you have successfully installed MySQL Shell for Mac, feel free to eject the DMG and delete the file.
Start MySQL Shell to verify the installation.
This output indicates that the installation was successful.
Starting MySQL Shell
You can start MySQL Shell using this command:
This will start MySQL Shell in JavaScript mode (by default). To connect to a server, check out MySQL Shell Connections.
More MySQL Tools
MySQL Shell provides the advanced capabilities. Meanwhile you can also check out following tools
- Classic
mysql
, still the most widely used MySQL client. - Top MySQL GUI client.
- Top MySQL Schema Compare Tool to Diff and Sync Database.
- Top Free Open Source SQL Clients.