Skip to content

Commit

Permalink
cmdutil: fix installation instructions for installing the mysql tool
Browse files Browse the repository at this point in the history
There is a difference between the classic `mysql` and the `mysqlsh` tool (which we were telling the users to install.

This PR fixes the links to suggest to install the correct tool from the official installation instructions.
  • Loading branch information
fatih committed May 24, 2021
1 parent 7e38647 commit 71bacb5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/cmdutil/cmdutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,20 +158,20 @@ func MySQLClientPath() (string, error) {
return path, nil
}

msg := "couldn't find the 'mysql' client required to run this command."
installURL := "https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-install.html"
msg := "couldn't find the 'mysql' command-line tool required to run this command."
installURL := "https://dev.mysql.com/doc/refman/8.0/en/installing.html"

switch runtime.GOOS {
case "darwin":
if HasHomebrew() {
return "", fmt.Errorf("%s\nTo install, run: brew install mysql-client", msg)
}

installURL = "https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-install-macos-quick.html"
installURL = "https://dev.mysql.com/doc/refman/8.0/en/macos-installation.html"
case "linux":
installURL = "https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-install-linux-quick.html"
installURL = "https://dev.mysql.com/doc/refman/8.0/en/linux-installation.html"
case "windows":
installURL = "https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-install-windows-quick.html"
installURL = "https://dev.mysql.com/doc/refman/8.0/en/windows-installation.html"
}

return "", fmt.Errorf("%s\nTo install, follow the instructions: %s", msg, installURL)
Expand Down

0 comments on commit 71bacb5

Please sign in to comment.