Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysql client connection gcloud

I have installed gcloud client library but GCP keeps on giving me this error what could the issue

ERROR: (gcloud.sql.connect) Mysql client not found. Please install a mysql client and make sure it is in PATH to be able to connect to the database instance

like image 240
Anuj Butail Avatar asked Jun 08 '17 07:06

Anuj Butail


2 Answers

The problem is that either you have not installed the MySQL client locally, or gcloud can't find it.

If you have not installed MySQL yet, follow the instructions to do so.

If you have installed MySQL but you're still getting this error, try entering mysql at the shell prompt. If you get a command not found error, MySQL is missing from your $PATH, and you need to figure out where it has been installed.

For example, on OS X, MySQL defaults to /usr/local/mysql/bin/. Add this to your $PATH, and it should start working:

export PATH=$PATH:/usr/local/mysql/bin/
like image 125
lambshaanxy Avatar answered Oct 19 '22 19:10

lambshaanxy


We get this error when mysql client is not installed in your machine.

  1. Refer https://www.youtube.com/watch?v=OM4aZJW_Ojs&t=150s&ab_channel=AmitThinks video to install my-sql in windows.
  2. Post installation of my-sql add the path C:\Program Files\MySQL\MySQL Server 8.0\bin to PATH environment variable.
  3. Close and then open your Google Cloud SDK shell and run the command again.

This will solve the problem.

like image 37
Bunny Avatar answered Oct 19 '22 19:10

Bunny