1

I have am error ; when I execute the sql proxy client . (for connecting from host to GCP SQL https://cloud.google.com/sql/docs/postgres/sql-proxy)

this is the code

ubuntu@ubuntu22-10:~$ ./cloud_sql_proxy -dir=/cloudsql -instances=project_id+instance=tcp:0.0.0.0:5432 -credential_file=ser_account.json

-bash: ./cloud_sql_proxy: cannot execute binary file: Exec format error

OS info ( multipass instance with mac m1 2021):

Linux ubuntu22-10 5.19.0-29-generic #30-Ubuntu SMP PREEMPT_DYNAMIC aarch64 aarch64 aarch64 GNU/Linux

it seems that there are problems with file.

Do you have any idea?

thanks

f0rs4k3n
  • 61
  • 3

1 Answers1

1

I had 2 versions. One was intended to run in a Docker image, and the other, locally on my M1 Mac. I mixed up the amd64 and the arm64 binaries. Make sure you're running the correct binary for your system.

Liem Ta
  • 39
  • 4