MySQL Shell 5.7.17

As I was downloading the mySQL shell (version 5.7.17), it occurred to me that I couldn’t access mysql through the terminal as directed by many many tutorials online.

I’m not sure if it’s because the tutorials are outdated or I’ve been looking at the wrong stackoverflow posts but a few things were different for my download of the mySQL shell 5.7.17:

  1. the shell is actually called mysqlsh, not mysql
  2. the file was installed in/usr/local/mysql-5.7.17-macos10.12-x86_64/bin, rather than just /usr/local/bin

To solve the problem:


echo $PATH

export PATH=$PATH:/usr/local/mysql-5.7.17-macos10.12-x86_64/bin

mysqlsh

If I look in my $PATH, I did not have the location of my mySQL shell in my $PATH so the second line adds the correct path to the shell.

The last line initiates the mySQL shell.

screen-shot-2017-02-19-at-11-34-31-pm

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s