MySQL连接到谷歌应用引擎实例

时间:2015-03-01 12:57:53

标签: mysql sql google-app-engine client

我有一个谷歌应用引擎应用程序和云SQL设置,我已将应用程序附加到实例,但现在我必须使用MySQL客户端(终端)将我的计算机(MAC OS X)连接到实例。根据GAE教程:

shell> mysql --host=instance-IP --user=user-name --password

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.31 (Google)
....
mysql>

但这就是发生的事情(主机是实例的IP地址)我不知道该用什么作为用户名?:

Tom$ mysql --host=173.194.225.73--user=username --password
Enter password: 
ERROR 2005 (HY000): Unknown MySQL server host '173.194.225.73--user=username' (0)

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

将空格添加到IP - 用户名后,需要在Cloud SQL中添加 - >访问控制 - >允许将您的IP地址作为允许访问的IP地址进行网络连接。