Tuesday, December 20, 2011

Access denied

Hello!
Today I received the activation email from google for the cloud sql
service. I created a instance in my project and a Database called
"test". So I downloaded Eclipse 3.7.1 with GAE 1.6.1.. So all works
fine.
Now I try the demo under "https://code.google.com/intl/de-DE/apis/sql/
docs/developers_guide_java.html
" but it did not work. I always get the
Exception
java.sql.SQLException: Access denied for user
'myEmail@gmail.com'@'localhost' (using password: YES)
The code is here:
Connection c = null;
try {
DriverManager.registerDriver(new AppEngineDriver());
c = DriverManager.getConnection("jdbc:google:rdbms://
projectid:instance/test", "myEmail@gmail.com", "secret");
} catch (SQLException e) {
e.printStackTrace();
} finally {
if (c != null) {
try {
c.close();
} catch (SQLException ignore) {
}
}
}
Why is localhost use And why is my Account not allowed? In the Logs in
the API-Console the email is exactly the same I use in my code. So the
email must be ok....
I already configured the project with "Enable Google Cloud SQL" and
choose "Use Google Cloud SQL instance" with the same Data....
I only want to try the first example and it is not working....
Thanks for Help!
Regards, Markus

No comments:

Post a Comment