0
votes

I have made a cloud sql instance and created a dataset inside it which contains a table.I tried connecting my app engine connected project to the table with eclipse(juno) by going to app-engine settings and configuring it but it requires a database name to be entered.But as I don't have a database on cloud sql(just a dataset and table) I was unable to provide one.So I downloaded mysql client(mysql-5.6.14) to create a database on cloud . The problem is that when I am trying to connect to my cloud sql instance I am getting the following error->

Statement-> mysql --host=instance-IP --user=root --password;

 ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use near 'mysql
     --host=<instance-IP> --user=root --password' at line 1

As suggested by some posts I have also tried some variations of the command->

mysql --host='instance ip' --user='root' --password;
mysql --host="instance ip" --user="root" --password;
mysql -uroot -p<> -h<instance ip>;

but to no avail.

I would love to see some suggestions on this, as I have been stuck on this for a long time.

Regards, Laura

1
Solved ! I finally found the solution here stackoverflow.com/questions/19898578/… Regards, Laura - Laura Stone

1 Answers

0
votes

I was having the same issue here and I guess the problem is the actual command line tool from MySQL 5.6

I fixed it by doing the following:

  1. changing the cloud SQL instance to MySQL 5.6
  2. installing MySQL 5.6 in my computer and then accessing the cloud instance via its setup wizard

It worked fine... I tried via the command line tool for over a day in all possible ways I could find on the web and nothing worked, this one did.