mysql client connection gcloud
Asked Answered
B

2

9

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

Becquerel answered 8/6, 2017 at 7:30 Comment(0)
M
6

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 is by default installed in the directory /usr/local/mysql/bin/. Add this to your $PATH, and it should start working:

export PATH=$PATH:/usr/local/mysql/bin/
Moan answered 28/11, 2018 at 10:58 Comment(0)
C
1

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.

Consistency answered 23/7, 2021 at 18:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.