Friday, December 30, 2011

Re: Invalid connection id

Your welcome. :)
Happy New Year :)

--Abhishek


Re: Clarify impact on how GAE instance hours are spent

The mysql instance is completely separate from your application.  It could be that there is some inefficiency in your app or the JDBC driver causing more time to be spent processing query results.  If you find that the problem is with the JDBC driver, please provide a data set and queries that we can use to reproduce the problem.

Thanks,
Ken


Re: Invalid connection id

Hi,
Thanks you very much.
I specified the connection pool size to zero and i deploy a new
version of my app. it's been 10 hours i didn't get the invalid
connection id error.
Thank you for your help.

Thursday, December 29, 2011

Re: Invalid connection id

Ok thanks, i'm going to specify the connection pool size to zero

Re: Invalid connection id

Hi,

I was getting the same error a while ago. I am using GAE, cloud SQL with hibernate and what I found was that the
hibernate was returning the invalid session id from its connection pool instead of creating a new one.
So I specified the connection pool size to zero by adding following property to hibernate.cfg.xml file and it worked :

<property name="connection.pool_size">0</property>


---Abhishek

Invalid connection id

Hi all,
I worked on a gae app using google cloud sql, hibernate and spring.
When i connect to my app it's work perfectly but 6 hours later i got
"an Invalid connection id" error. somebody can help me please? thanks.

Wednesday, December 28, 2011

Re: Suggestion - shortcut for execute command in SQL Prompt (API Console)

Ctrl+Enter should do this.

Thanks,
Brian


Re: Google Cloud SQL - Security Hole ????

You must authorize specific Google accounts to access your instance on the Team page in console. Having an instance name and database name is not sufficient to gain access to your database -- you must be authorized as one of those Google accounts too (or be connecting from an authorized AppEngine app id).

I'm not that familiar with the Eclipse plugin integration, but it seems likely the case that once you've established OAuth authorization for your instance with the first account you logged in as, it continues to use this authorization for the remainder of your session.

Thanks,
Brian


Tuesday, December 27, 2011

Google Cloud SQL - Security Hole ????

Today I installed the latest GPE, I went in and configured the Google 
SQL instances. Within Eclipse's "Data Source Explorer" I can see the 
instances, I can Connect, Navigate and run the sql against the 
instance(database). All is good. (While I am logged in as <user A> 

Now, I logged out, logged in as a different user <user B>, Still I am 
able to do all the above as an authorized user. OK, I logged out of 
Google within eclipse, STILL I was able to connect to the Cloud SQL 
instance. 

In the Google API's console, I have a project which has just only one 
user <user A> thats configured as an Owner. Under that project I have 
my Cloud SQL instances that I am talking about. 

As per the (http://code.google.com/apis/sql/docs/ 
basic_tasks.html#accesscontrol) "Project roles determine whether a 
caller can access an instance in that project", So if I don't have a 
user specified within a project, currently he is ABLE to access the 
SQL instance within that project. 

So all an hacker needs is, my instance and database names for him to 
get into it. 

ALSO in the same link, "You can create specific MySQL user roles using 
the CREATE USER SQL command, but you should be aware that any user 
with project-level permissions can log into the database as root and 
modify user privileges." SO as per the above hole, an imposter can get 
access into the instance and there by get root access into my MySQL 
instance. 

Am I missing anything????? 

Help me to understand.

Clarify impact on how GAE instance hours are spent

I recently started playing around with this, very neat piece of
functionality.

One thing I noticed is that whenever I use a DB connection in my GAE
instances the CPU hours seem to be consumed at a much higher rate.
This is an empirical observation of course.

I remember reading on the documentation that using GAE applications
with master/slave replication instead of HRD could hurt mysql
performance, which hints that the GAE instance could be the underlying
instance powering the DB. If this is the case, I think this should be
mentioned in the documentation as this has a potential impact on how
the instance hours are spent.

Suggestion - shortcut for execute command in SQL Prompt (API Console)

Adding a shortcut key to the Google API console - SQL Prompt screen
that would execute the current sql would be a nice to have.
This is something found in many SQL programs where you type your SQL
select it and hit F9 for example.

Thanks
Dustin

java.lang.NoClassDefFoundError: javax/naming/NamingException

I am getting class not found error class javax/naming/
NamingException,
I am trying to use google cloud for my app , it works locally .
here is the complete exception stack trace

Nested in org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'fItemService': Injection of autowired
dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
autowire method: protected void
org.seva.dc.ns.service.DefaultFItemService.init(org.seva.dc.ns.doa.GenericDao);
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'fItemDAO': Injection of autowired
dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
autowire method: protected void
org.seva.dc.ns.doa.AbstractHibernateDAO.init(org.hibernate.SessionFactory);
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory': Post-processing of the
FactoryBean's object failed; nested exception is
java.lang.SecurityException: Unable to get members for class
org.hibernate.impl.SessionFactoryImpl:
java.lang.NoClassDefFoundError: javax/naming/NamingException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2444)
at java.lang.Class.privateGetPublicMethods(Class.java:2564)
at java.lang.Class.getMethods(Class.java:241)
at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:
213)
at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:
254)
at
org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:
286)
at
org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:
117)
at
org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:
87)
at
org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:
68)
at
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:
359)
at
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:
322)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:
407)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.postProcessObjectFromFactoryBean(AbstractAutowireCapableBeanFactory.java:
1561)
at
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:
162)
at
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:
102)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:
1440)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
304)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
192)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:
848)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:
790)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:
707)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:
553)
at
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:
84)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:
285)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:
1074)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:
517)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:
456)
at org.springframework.beans.factory.support.AbstractBeanFactory
$1.getObject(AbstractBeanFactory.java:293)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:
222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
290)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
192)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:
848)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:
790)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:
707)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:
553)
at
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:
84)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:
285)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:
1074)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:
517)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:
456)
at org.springframework.beans.factory.support.AbstractBeanFactory
$1.getObject(AbstractBeanFactory.java:293)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:
222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
290)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
192)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:
585)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:
895)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
425)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:
282)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:
204)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:
47)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:
548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at com.google.tracing.TraceContext
$TraceContextRunnable.runInContext(TraceContext.java:449)
at com.google.tracing.TraceContext$TraceContextRunnable
$1.run(TraceContext.java:455)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:
695)
at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
333)
at com.google.tracing.TraceContext
$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
325)

Sunday, December 25, 2011

Integrate Google sites with Cloud SQL

Hi,

Is there a widget app/something like where I can integrate my google site to show up the data (using cloud sql) from the cloudsql instance and display it on the google site page? (Primarily, it will be used only for displaying the filtered records/views from the database instance tables onto formatted html table/records. I know integrate this with google spreadsheet, but that would be something really different from what I want. 

If not, if it warrants a seperate code / project, I would be interested in collaborating one.

Thanks.

Friday, December 23, 2011

Full text search performance is 30x slower

Hi Google Cloud SQL discuss,

I imported a DB (~100k rows) on which I am doing full text searches,
in a stand alone MySQL these searches take approximately 500ms under
load. In CloudSQL they are taking more than 30 seconds causing
Apennine to exceed the request time limit.

The table was originally MyISAM with fixed columns (char 255) to make
it faster. I tried converting it to InnoDB (as per GCS documentation)
but the performance in GAE remained the same.

Any suggestions? Or are full text searches just too slow to be done in
the GCS?

Thursday, December 22, 2011

Re: Future of Project

Hi Michael,
We're focussed on providing an RDBMS for GAE and other parts of the Google Cloud at the moment. The external JDBC is designed primarily for reporting and admin tools.
Hope this helps,
Happy Christmas
Joe

Future of Project

I know this is a preview of the project but I was wondering if anyone had some information on if this project will be a stand alone project or really just for existing appengine users?  I see there isn't a simple way to connect externally to use the service, no direct ip/address to connect to, and the qps is limited to 5 when connected externally which is restrictive for production apps.   I understand that this service is in "preview" and plans change, but any insight into the direction would be appreciated.

Re: Py rdbms.connect does not support charset = "utf8" or use_unicode = True

Update: Actually seems to be that the accented character is in one of
the columns in the result set, not in the query.
Looking at Google SQL documentation, it says they only support utf8 at
the moment, so perhaps is why those two arguments are dropped in
production. The python library shouldn't fail to retrieve valid utf8
strings tho.

Py rdbms.connect does not support charset = "utf8" or use_unicode = True

In development mode my application works fine. When I deploy it to
App Engine I see that these two options are dropped and an exception
is thrown as soon as I try to run a query that contains an accented
character.

2011-12-22 11:41:57.342
Ignoring extra kwargs to connect(): {'charset': 'utf8', 'use_unicode':
True}
....
cursor.execute(q, newTuple)
File "/base/python27_runtime/python27_lib/versions/1/google/storage/
speckle/python/api/rdbms.py", line 319, in execute
tuple_proto.values[value_index]))
File "/base/python27_runtime/python27_lib/versions/1/google/storage/
speckle/python/api/rdbms.py", line 255, in _DecodeVariable
return converter(value)
File "/base/python27_runtime/python27_lib/versions/1/google/storage/
speckle/python/api/converters.py", line 112, in Str2Unicode
return unicode(arg, 'utf-8')
UnicodeDecodeError: 'utf8' codec can't decode byte 0xed in position 9:
invalid continuation byte

Re: Table doesn't exist

try large letters "PERFORMANCE_SCHEMA"

Table doesn't exist

Hi

I've been using the SQL prompt in the Google APIs Console to set up a database table.
Today I've tried to query a table I created the other day and I'm getting the following error: Table 'performance_schema.***' doesn't exist
What do you think I've done wrong. Could it be that I inadvertently created a temp table that has been automatically dropped? The table was created using a simple CREATE TABLE query.

Also, when I look at the overview, the instance shows to be using 28MB. Surely that means my data is still there, right?


Thanks a lot for any help

Wednesday, December 21, 2011

Re: Google Apps Script JDBC Service and Google Cloud SQL

Just watching http://www.google.com/events/io/2011/sessions/enterprise-workflow-with-apps-script.html and during the Q/A, Evin Levey comments on the fact that trusted testers on Hosted SQL can use Apps Script to access a database. "He'll hook them up!"
So that was in May 2011. I'm guessing Hosted SQL was the name used for Cloud SQL before it was released officially in November.

Is there a timeframe for 2012 when we might see this?

Geoff


Tuesday, December 20, 2011

Re: Access denied

I found the solution at this tutorial:
http://mandubian.tumblr.com/post/13459210142/tutorial-for-googlecloudsql-with-play-1-2-3-siena
Just create the user:
CREATE DATABASE tweetdemo;
CREATE USER 'tweetdemo'@'localhost' identified by 'xxxxxx';
GRANT ALL PRIVILEGES ON tweetdemo.* TO 'tweetdemo'@'localhost'
Seems to be that google did not created default access from the
default email account.
But thanks for Answer!

Re: Access denied

If you remove the username and password from the call to DriverManager.getConnection(), the ones you specified in the rdbms.url property will be used when talking to a local mysql in the devapp server.

Rob



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

Saturday, December 17, 2011

increase auto log off time

Hi All,
 I am accessing cloud sql for some operations from command prompt, how can I increase the auto log off time?
 It kicks me out if no activity from command prompt.

 Thank you.

 Bhargava.

Re: Help!! Error: System property rdbms.driver must be set.

Ahhh bootstrap instead of user, spent hours and finally found this which solved the problem, thank you!

Thursday, December 15, 2011

Re: execute sql file

Thanks a lot, I dont know how I missed this section :).

 Thank you.

Regards,
Bhargava Sriram A.



Wednesday, December 14, 2011

Re: execute sql file

Hi Bhargava

There's some help on importing data here:

J


execute sql file

Hi All,
 Good morning, I have a huge sql file around 4MB size, I want to insert data into cloud sql.
 I am using google jar file and accessing from my command prompt, How to execute this sql file to insert data into cloud sql?

 Thank you.

 Bhargava.

Tuesday, December 13, 2011

Re: Any way to change cloud sql instance global variable values

Hi Rob,
Thanks for your reply.

I have set a deadline for my team that when Google SQL comes out of Preview, we should be on Cloud SQL. I have 2 options
1. Make tons of changes to my code (unnecessary as you are looking for ways to allow us make the changes to the config)
2. You guys make this SMALL change to all  instances which will benefit all today who are testing also. I am sure there are others who are testing who have similar issue. This you can do while you figure out a way solve the problem long term.
3. Don't do any testing, wait for you guys to figure out how to solve this show stopper issue for all of us having this problem.

Also can you please look into partitions and if that is possible in Google C SQL?

Please suggest a direction for us. Sorry for the trouble but I hope you will appreciate the problem we are in as we look to be one of the first adopter of this.

Thanks


Re: Any way to change cloud sql instance global variable values

Hi,

Since MySQL defaults to case sensitivity, we use that default.  We're looking at ways of offering the ability to offer some configuration changes on a per instance basis, but it's not something we offer today.

Thanks,

Rob



Re: Any way to change cloud sql instance global variable values

Hi Tony,
Why cannot this be set for all the instances universally? Case
insensitivity will help us in migrating from Oracle (which supports
case insensitivity). This will not affect anyone so why not provide
this to all instances universally. We have to make a lot of changes to
our code just because of this and I am sure there are others who will
face similar issue.
Also I am unable to create logical partitions in the instance. I was
told this was possible but it seems not.
Thanks

how to deploy PHP to Google App Engine and Google Cloud SQL using Quercus?

I tried to deploy my php application on Google App Engine and Google Cloud SQL using Quercus. But, I got an error message: not suitable Driver.

My code is

import com.google.appengine.api.rdbms.AppEngineDriver;

import java.io.IOException;
import java.sql.*;

java("java.sql.DriverManager")->registerDriver(new Java("com.google.appengine.api.rdbms.AppEngineDriver"));

$c = java("java.sql.DriverManager")->getConnection("jdbc:google:rdbms://soccipasspc:pass-pc/passpc");

..................

Any help are appreicated!

Re: frequent "Invalid Connection Id"

Thanks Rob, I've disabled the default hibernate connection pooling from my hibernate.cfg.xml and almost three days have passed and I haven't seen any "invalid connection id".  :)

--Abhishek

No api proxy found for service "rdbms"

Hi,

I'm developing an app using the python 2.7 runtime and django-nonrel (which, as I understand, is the currently recommended way to build Django apps for App Engine). I'd like to access a Google Cloud SQL instance from my app. Note that I am not trying to replace Django's database. I simply want to retrieve data from Google Cloud SQL independent of Django.

I got a simple test to work when deployed, but I get the following error from the development server:

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 301, in MakeSyncCall
    assert stub, 'No api proxy found for service "%s"' % service
AssertionError: No api proxy found for service "rdbms"

Note that, since my app is built using Django, I need to launch the development server via './manage.py runserver' instead of './dev_appserver.py'. 

My development machine is running Mac OSX 10.7.2, MySQL 5.5.18, and I've installed MySQL-python-1.2.3. I can successfully import MySLQdb from an interactive python interpreter. A last piece of information: when the development server starts up, it throws the following warning:

WARNING  2011-12-13 14:03:14,366 py_zipimport.py:139] Can't open zipfile /Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg: IOError: [Errno 13] file not accessible: '/Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg'

Any ideas about what I'm missing?

Thanks!
Leo

Monday, December 12, 2011

Integrating with Google Cloud SQL from .Net Code

Has anyone been able to invoke the DB web service using C#?

Thanks.

How to connect from ide tool

Hi,

How to connect from ide tool development, what's the string
connection??

Re: Invite Did Not Contain Activation Link

Same for me, all good now. Thank you!

Re: Invite Did Not Contain Activation Link

Thanks Joe. I just receive the second email and the link was there
(and worked).
- Bryce

Re: Invite Did Not Contain Activation Link

I had a same issue and I am about to ask the same question.

So is it okay that I just wait for a new email contained activation link?

Re: Invite Did Not Contain Activation Link

Dear All

Many apologies, but a glitch meant that emails were sent to some of you who had signed up for the Cloud SQL limited preview containing a blank activation link.
Live links will be sent shortly

J

--
Joe Faith | Product Manager | Google Cloud SQL

Invite Did Not Contain Activation Link

I just received my invite email and it says to click an activation
link however the email does not contain an activation link. There is
an empty space in the email text where a link should be.
The email contents:
"""
Thank you for your interest in Google Cloud SQL. You can activate the
service using the URL below using your account:
Please note that the link expires in 48 hours.
Then visit our documentation at: https://code.google.com/apis/sqlservice/
For any questions or comments please use http://groups.google.com/group/google-cloud-sql-discuss
To receive announcements and updates about Google Cloud SQL, subscribe
to https://groups.google.com/group/google-cloud-sql-announce/
Looking forward to you getting started on Google App Engine using
Google Cloud SQL.
Thanks,
The Google Cloud SQL Team
"""

Re: no link in the invite

now i know what ti's like to be those students who get acceptance
letters from Universities and then find out it was a mistake.
ok, maybe not, but I'm sure some people really wanted SQL cloud

Re: no link in the invite

Same issue for me, received the invite, but no link in email.
Google stuff - kindly send us a new email with activation link.

Re: no link in the invite

same here, no link in the email invite.

Re: no link in the invite

GOOGLE EMAIL FAIL...yep, no link!

Re: no link in the invite

Hello all,

I am having the same issue as Guillaume. I just received the email.

Thanks for the help!

no link in the invite

Good morning people
I just saw my mail box and was pretty happy to get my invite for the
Cloud SQL.
Though, while reading I realize that there is no URL to start using
the account.
Just some blank space before being said the invite is valid for 48
hours only.
In the Google API page, Cloud SQL is still written disabled, with the
"request access" link.
Is there a thing I missed somewhere ?

Cannot activate Google Cloud SQL

No link seemingly provided in email to activate the service. Google
API dashboard still has 'request access'. Google, get your email
communication right! lost as to how I can activate the service.

Thank you for your interest in Google Cloud SQL. You can activate the
service using the URL below using your account:

Please note that the link expires in 48 hours.

Then visit our documentation at: https://code.google.com/apis/sqlservice/

For any questions or comments please use http://groups.google.com/group/google-cloud-sql-discuss

To receive announcements and updates about Google Cloud SQL, subscribe
to https://groups.google.com/group/google-cloud-sql-announce/

Looking forward to you getting started on Google App Engine using
Google Cloud SQL.

Sunday, December 11, 2011

Re: Cloud invite expired

Dear joe,
I also forgot to check the mail and my welcome link is expired for google cloud sql.
Please help me to get this.
tikam


Re: My DBs vanish

Sorry, a found them.

They are in another project. 

Thanks

Tomás


My DBs vanish

Hi there,

My DBs vanish from Google APIs console. Hope their will came back.

They vanish from Google APIs console but I can access them from a app. 

What is happening?

Friday, December 9, 2011

Re: help with full-text 3 letter "words"

Philip,

What is the exact problem you are trying to solve? If it's just a 3 character requirement we *should* be supporting this when we ship full text search for App Engine. If you're doing something where you need a union of multiple 3 characters, we might be able to come up with some ideas about how you can build this. It seems like you've found a solution for now, so we can go with that because it doesn't seem to have too many tradeoffs besides a marginal space increase.

--
Ikai

P.S. I think MongoDB is pretty cool stuff (I give talks at meetups and conferences about why people should check it out), but every technology has tradeoffs.


Re: help with full-text 3 letter "words"


Hi Philip,

Nice hack! Thanks for documenting it for others and thanks for sticking with Cloud SQL, despite this shortcoming.

The reason we are not providing access to Mysql config files is that we want to offer Cloud SQL as a zero-admin service. This means we take full responsibility for running your instances, like GAE does for apps. But this also means that we cannot give you full access to the mysql config because there's just too many ways to render an instance inoperable by changing it.

Of the goals of being in preview is to learn more about what our users want, and the case you've described seems like a legitimate reason to open up some of the config (the app-level part) to users and we'll definitely consider the option.

We really appreciate the feedback, so keep it coming!

Cheers,

jm.



Re: help with full-text 3 letter "words"

My current solution is the following.
1. Added new column in table called "searchable" that has all of the
words from the columns that used to be full-text searched. This new
column has all words with less than 4 letters suffixed with
underscores (_). The Python code I used to do that is:
temp = temp.replace(',', ' ').split()
searchable = [word.ljust(4, '_') for word in temp]
searchable = ' '.join(searchable)
2. Before querying Cloud SQL using MATCH I put the user entered query
through the same Python code above to add the underscore suffix to
short words being searched for.
3. Now I can find words that are less than 4 letters without needing
to modify the Cloud SQL configuration file for my instance which is
currently not supported.
So, to summarize, I am syncing data in Cloud SQL with the Google
datastore that needs geo and full-text searching (to get around the
datastore not supporting full-text or geo searches). I am making a
custom searchable column in Cloud SQL (to get around the 4 characters
minimum for full-text search) that Cloud SQL has as the non
configurable default. This new column is the only column I am full-
text indexing. When a user runs a query, I pre-process it to have it
match the underscore suffix I am using on short words stored in the
searchable column.
Example: "zap" becomes "zap_" in both the searchable column and the
query that is used in MATCH.
Now I can do multi-word (phrase) full-text searches even with short
words (i.e. "zip zap") which in my real app are abbreviations.

Re: help with full-text 3 letter "words"

This is very bad news. Cloud SQL full-text search has been my last
ditch effort to have a reasonable search solution for my app.
I have waited for a long time to get datastore full-text search and I
still don't have access to the alpha. I don't even know if it would
meet my needs since I haven't found public access to the documentation
for datastore full-text search. I just spent the last week getting
full-text and geo search working in the app using Cloud SQL and now
it's not going to work because of this configuration issue. Whoosh is
probably too slow, single word searches don't meet my app
requirements, Google custom search engine is always behind or
incomplete. Did I leave any options out?
I have to say that I have been a huge advocate for Google App Engine
with many paid apps. But, alas, things like this are wearing me out.
The wait is too much and the functionality too little. node.js,
Mongodb and other solutions are gaining steam and in my opinion,
things like this, are *major* detractors for Google App Engine. I
really like the instance model Google has, but the roadmap that takes
many, many months (think 1 year+ from on the roadmap to alpha) to
deliver on for SSL, full-text search, full PIL support, PDF generation
and the like takes incredible patience to deal with.
Please let me know if there is any way we can make an improvement on
this now for Cloud SQL.
I have gotten so used to hacking around App Engine limitations I am
already thinking of adding a special character to 3 letter words in a
hidden tags fields that is a copy of the text in many other fields so
that when people search for a 3 letter word I have a hope of finding
it (if I add the same special character to their words before
searching). Workarounds like this are tiresome and beyond hackish.
This needs to change. Coming up with my own handling for multi-word
search strings (phrases), geo searches with "nearby" results as well
as other criteria based on data equalities and inequalities is somehow
a massive stretch for Google to support. Not even mentioning the huge
hassle doing a partial or prefix match would be (functionality I
really need in another app and could be well served by the LIKE
operator) on the datastore. So, basically what I am saying is that the
datastore and Cloud SQL leave a lot to be desired.
I would like to remain an advocate, please help me find a good
solution now.

Re: help with full-text 3 letter "words"

Hi Philip,

We don't support changing the my.cnf file.  We'll look into providing that feature.  For now, you'll have to work around this in your application.  You could use a LIKE query for short words.

Ken


help with full-text 3 letter "words"

I am using full-text with a table that uses the MyISAM engine.
Searches seem to work pretty well, except when my dataset is too small
or words are too short. When there are too few rows, some of the data
is not unique enough to be full-text indexed based on what I have read
in MySQL docs. I think this condition will go away once I have more
diverse data (i.e. real-life data).

My bigger need with full-text is to find 3 character words like "zap".
Currently, if I try to search on zap, data is not found. But, if I
change the word to "zapf" it is found. That leads me to think that 3
character words aren't being indexed by Cloud SQL. Is that the case?
If so, how do I fix that?

For example, do I need to edit the Cloud SQL equivalent of the MySQL
my.cnf file? If so, how do I do that?

Possible change needed to my.cnf for my Cloud SQL instance:
[mysqld]
ft_min_word_len=3

[myisamchk]
ft_min_word_len=3

Note: "zap" does not appear to be in the standard MySQL full-text
stopwords list.

Re: can i rollback the mistake command in sql prompt?

thank you, Bhargava and Brian .
it is helpful.

Re: can i rollback the mistake command in sql prompt?

Hi Thor,
 Sorry I was busy with other work.

 YOu can use the below link and using command line you can download:

 Or even if you can use the sql squirrel for the same:



 Thank you.

Regards,
Bhargava Sriram A.




Re: can i rollback the mistake command in sql prompt?

After you've exported to Google Cloud Storage, you can use the Google Storage Manager or command line tools to download the dump file to your local machine.

Thanks,
Brian


Re: frequent "Invalid Connection Id"

Are you caching the connection objects between requests?  If so, you should try to open a connection at the start of the http request and close it when finished.  Connections can time out when not in use.

Rob



Re: can i rollback the mistake command in sql prompt?

bytes.

Thursday, December 8, 2011

frequent "Invalid Connection Id"

Hi All,

My hibernate application is running on appengine and uses a cloud sql instance. Whenever I test my application, sometimes everything works fine and I login, perform operations and logout normally. When I again fire the application after few mins and try to login, what I get is "Invalid Connection Id".
 This happens quite often. Sometimes, at the end of the day everything works fine, and when I start the application the next morning, it refuses to log in saying again "Invalid Connection Id". Every time I fire the application, I use new window and reload the application again but it didn't help.
I am unable to find any pattern in its occurrence and there was only once (day-before-yesterday) that the entire day goes without seeing a single Invalid connection id in the application logs. Its popping up very frequently causing difficulties during testing.
Anybody facing this problem that frequently?
Any possible reason and solutions would be of great help.

---Thanks in advance,
Abhishek

Re: incompatibility between Google Cloud SQL and MySQL 5.5

I found my bug in the above code. I had fixed the function on MySQL to
take a string as input and the same fix (to add precision) wasn't
applied to Cloud SQL.
Here is the UDF that works correctly in both:
CREATE FUNCTION epoch_microseconds (a NVARCHAR(100)) RETURNS BIGINT
DETERMINISTIC
BEGIN
RETURN TIMESTAMPDIFF(MICROSECOND,'1970-01-01',a);
END

incompatibility between Google Cloud SQL and MySQL 5.5

I have the following function tested and working on a local MySQL 5.5
installation:

CREATE FUNCTION epoch_milliseconds (a DATETIME) RETURNS BIGINT
DETERMINISTIC
BEGIN
RETURN TIMESTAMPDIFF(MICROSECOND,'1970-01-01',a);
END

When I run:

SELECT epoch_microseconds('2011-12-08 21:46:15.214000');

I get:

1323380775214000

When I run the same function on Cloud SQL I get:

1323380775000000

Basically, it appears Cloud SQL has less precision than MySQL 5.5 for
the TIMESTAMPDIFF function.

Any ideas why Cloud SQL is returning a different value than MySQL 5.5?

Re: can i rollback the mistake command in sql prompt?

1 million records? or 1MB database?

 Thank you.

Regards,
Bhargava Sriram A.



Tuesday, December 6, 2011

Re: Is is possible to access Google Cloud SQL while running locally?

Nevermind, answered my own question. The DB does have to have the same
name!
Whoo hoo! Now I'm off to the races.

Re: Is is possible to access Google Cloud SQL while running locally?

Yes, it should.  That'll also make life easier for you to keep things in sync.

Rob


Re: Is is possible to access Google Cloud SQL while running locally?

Great call.
It didn't quite fix it but leaves me with an java.sql.SQLException:
Unknown database 'mrdb01'
mrdb01 is the name of my GAESQL DB, does my local one have to have the
same name?

Re: High memory process to interact with database.

Hi Marcelo

We don't offer an alternative connection that could support that kind of load. The best route might be to look at alternative storage options for the Java process data, such as the datastore, so it doesn't have to keep it all in RAM.

J


Re: The rdbms API is not available because the MySQLdb library could not be loaded.

When I added MySQLdb to the PYTHONPATH and adding "import MySQLdb" to
dev_appserver.py rdbms was found and worked.
Note: I'm using a Mac and the PYTHONPATH I added in Eclipse to the
project External Libraries was:
/Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.7-
intel.egg

High memory process to interact with database.

Hello,
We have a mysql database which we want to migrate which currently weighs 10GB on disk, average table has 1 million rows.

We have a process in Java which runs several times a day which does datamining and/or normalization of sorts.  The issue is that this Java process currently uses 6GB of ram.  

From what I have read, GAPE only supports 1GB for backend processes... is there an alternative way to connecto to Cloud SQL?

Thus far, this is the only limitation that I can see in order to migrate my application.

Thanks for the heads up.

Re: can i rollback the mistake command in sql prompt?

Please take a look at https://code.google.com/apis/sql/docs/advanced_tasks.html#importexport.
That contains the instruction on how to data to a Google Cloud Storage bucket.

Expired link

I was on vacation camping and missed the 48 hour window. Any way I
can reactivate the invite?

Re: Is is possible to access Google Cloud SQL while running locally?

"table not found in XXX" sounds like an HSQL error message, 1.4.2 of the AppEngine SDK is quite old, and was from before cloud sql was ready for use.  Please use 1.6.0 of the AppEngine SDK.


Thanks,

Rob


Re: can i rollback the mistake command in sql prompt?

thank you
and how to backup it?

Re: Is is possible to access Google Cloud SQL while running locally?

Lets take scenario #3 first.
I think your local mysql server have reached its value of max connection. You can check the value of max connection of your mysql server with this query:

mysql> select @@global.max_connections;

If you find this value low, then you can change it to a large value with this query::

mysql>set @@global.max_connections = 1000;  

That might solve your MySQLNonTransientConnectionException.

Now to your scenario #2. Have you try and run your select query to cloud-sql web interface? Is it selecting your table there? If the query is working there then there is no problem with the query. Try to eliminate PreparedStatement object like :: ResultSet rs = c.createStatement().executeQuery("your query string here");

---Abhishek

Monday, December 5, 2011

Re: Is is possible to access Google Cloud SQL while running locally?

I have the mysql-connector-java-5.1.18-bin.jar in both the SDK folder
as identified in the VM Arguements in my Run Configuration. e.g:
-javaagent:C:\eclipse\plugins\com.google.appengine.eclipse.sdkbundle.
1.4.2_1.4.2.v201102111811\appengine-java-sdk-1.4.2\lib\agent\appengine-
agent.jar
and I have a copy in my project lib folder which I added to the
buildpath

Re: Is is possible to access Google Cloud SQL while running locally?

Ok I solved that driver error but I'm back to familiar ones.
Here are the 3 scenarios I have:
1) In a simple java project I have this code:
public static void main(String[] args) {
System.out.println("1");
try {
Class.forName("com.mysql.jdbc.Driver");
Connection c = DriverManager.getConnection(MY LOCAL MYSQL
CONNECTION STRING);
PreparedStatement ps = c.prepareStatement("SELECT * FROM
SOME_TABLE");
ResultSet rs = ps.executeQuery();
.....
This works and returns the correct values in the connection set.
2) In my GAE project I have

Connection c = null;
try {
DriverManager.registerDriver(new AppEngineDriver());
c = DriverManager.getConnection(MY GOOGLE CLOUD SQL CXN STRING);
PreparedStatement ps = c.prepareStatement("SELECT * FROM
SOME_TABLE");
ResultSet rs = ps.executeQuery();
It hits the catch block with this error:
[ERROR] Error listing items: java.sql.SQLException: Table not found in
statement [SELECT * FROM SOME_TABLE]
3) In my GAE project I have another method:
Connection c = null;
try {
Class.forName("com.mysql.jdbc.Driver");
c = DriverManager.getConnection(MY LOCAL MYSQL CONNECTION STRING);
PreparedStatement ps = c.prepareStatement("SELECT * FROM
SOME_TABLE");
This one throws this exception
[ERROR] Error listing items:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Could not create connection to database server.

I am at my wits end here. What is going on?

Re: Speed of one operation

Oops, I didn't hit send on my reply!

Cloud SQL is compatible with MySQL, so for the most part, you should be able to look at MySQL docs and get your answer. For fulltext indexing, you might want to look at MyISAM:


Are you looking for fulltext indexing or simple equality/inequality matching [select * from users where email IN ( BLAH) ]? If so, you probably can just get away with indexes. MySQL indexing in InnoDB (use InnoDB, just trust me on this) is done via b-trees, so you won't need a full table scan to find these matches:


If the emails are evenly distributed and it's not a lopsided tree, you should be able to complete the search in logarithmic time. You can see how well the indexes are performing by running an explain plan:

explain select * from users where email IN ( BLAH)

A full MySQL tutorial is a bit out of scope of this group, but I just wanted to hit home the fact that much of what's in those docs should apply. If you find any discrepancies, we'd love to know about it.

What exactly is it you are trying to do? There is a full text search feature coming soon, and if you use App Engine's datastore, you can do a get-by-key if the email is a key very quickly.

--
Ikai


Sunday, December 4, 2011

Re: can i rollback the mistake command in sql prompt?

YOu cant, always use the autocommit=0 immediately after the session starts.

Hope you are taking backup frequently.

 Thank you.

Regards,
Bhargava Sriram A.




Saturday, December 3, 2011

Re: anybody running django on the app engine with the sql service?

Hi People,
  Today I forked Tomas repository and add a simple request handler to run management commands on the app engine.
  The code is pretty simple, dirty, unsecure and not tested (so don't use it) but proves the concept.
  And you can play with the handler at: http://devsar-cloud.appspot.com/commands/
  To run the syncdb command use /commands/syncdb/ (it doesn't hang asking about initializing the auth)

Cheers, Sebastian
www.devsar.com

Re: One GAE Text Search question.

I use MySQL MyISAM table for fulltext search - it work good.

Friday, December 2, 2011

Re: One GAE Text Search question.

Hi Seabook


MyISAM tables currently support full text indexing but InnoDB does not. We recommend InnoDB with Cloud SQL, and its the MySQL default, but you could try using MyISAM for that one table.



J

--
Joe Faith | Product Manager | Google Cloud SQL

Re: MySQL DELIMITER statement not working in Squirrel

Giovanni, you were right.
The "MySQL Plugin" fixes the issue and I can now create functions and
procedures using Squirrel.
The "MySQL Plugin" was tricky to install on OS X. The Squirrel installer wasn't showing checkmarks as I clicked next to optional plugins. The first time I would click on an optional plugin, it wouldn't show as selected (no highlight in blue or checkmark).
Sometimes, the second time I clicked, the checkmark would appear. After installing Squirrel a few times, I noticed that optional plugins (with checkmarks) were not being installed. The solution to that was
for me to only click on optional plugins in the installer once and even though a checkmark did not appear, they apparently were selected and installed. I was able to see that this worked using the Squirrel
Plugins / Summary menu item.

Re: MySQL DELIMITER statement not working in Squirrel

Apologize - DELIMITER is actually a client thing, so a given client might not support it.

Apparently, to have it supported in Squirrel, you need to enable the so-called "MySql Plugin" - by default, Squirrel is not able to parse procedure statements.

Re: MySQL DELIMITER statement not working in Squirrel

Rob: DELIMITER is a proper SQL command that you use to change the char to be used as a delimiter. Since ';' is the default delimiter, one typically changes it to something else i.e. '//' to have the freedom to use ';' in multiline procedures as single-line delimiter (as opposed to // to be used as a procedure delimiter). So it should be understood and properly passed by every mysql client.

Philip: I think you have a syntax error in your example. If you try something classic like this, it should definitely work:

DELIMITER //
CREATE PROCEDURE test_delimiter()
BEGIN
  SELECT * FROM MY_TABLE;
END//
DELIMITER ;

I confess I did try this only in the google_sql tool, but there's no reason why Squirrel should not accept it, since the MySql engine does.

Thursday, December 1, 2011

Re: MySQL DELIMITER statement not working in Squirrel

Where did you try this, in squirrel or the google_sql.sh tool.

in google_sql.sh you need to use DELIMITER like you had originally.  In squirrel, I'm not sure how to do this.

Rob


Re: The rdbms API is not available because the MySQLdb library could not be loaded.

Try download http://sourceforge.net/projects/mysql-python/ and install
it/add to PYTHONPATH

Importing data from .csv file

OOPs!!! I made a typo in hurry. my local mysql server is "case-insensitive".  :)


Importing data from .csv file

Hi everyone,

Is there any way to import data in cloud sql instance table using .csv file?
Importing data this way to individual tables help me getting my data to case sensitive cloud sql instance from my local case-sensitive
mysql server.

--Thanks,
Abhishek

Wednesday, November 30, 2011

One GAE Text Search question.

I am using com.google.appengine.api.datastore.Text
to store my blog's article content. I want to make a full
search on all the contents.

In GAE, you can't search on the blob property since
they are not indexed. How do you guys overcome this issue?

Thanks,
Seabook

Re: MySQL DELIMITER statement not working in Squirrel

OK. But when I try the following:
DROP PROCEDURE IF EXISTS test_delimiter;
CREATE PROCEDURE test_delimiter()
BEGIN
SELECT * FROM my_table;
END;
I get:
Error: 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 '' at line 3
SQLState: 42000
ErrorCode: 1064
Error occured in:
CREATE PROCEDURE test_delimiter()
BEGIN
SELECT * FROM my_table
So how do I create a multi SQL statement procedure or function using
Squirrel? Also, it would be nice to have SQL that works in both
MySQLWorkbench and Squirrel.

The rdbms API is not available because the MySQLdb library could not be loaded.

I have installed MySQL and the necessary support libraries / files
locally. It is accessible from MySQLWorkbench, Squirrel, and the
Python 2.7 command line (i.e. import MySQLdb succeeds without any
errors). I added the following line to my ./bash_profile file too:
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/local/mysql/lib/"
When I try to start dev_appserver in Eclipse or from a command line
using:
dev_appserver.py --debug --mysql_user=root myapp
I get the following warning and error:
WARNING 2011-11-30 21:07:54,891 rdbms_mysqldb.py:90] The rdbms API is
not available because the MySQLdb library could not be loaded.
ERROR 2011-11-30 21:08:19,042 dev_appserver_main.py:632] <type
'exceptions.NotImplementedError'>: Unable to find the MySQLdb library.
Please see the SDK documentation for installation instructions.
DEBUG 2011-11-30 21:08:19,046 dev_appserver_main.py:634] Traceback
(most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver_main.py", line 629, in main
dev_appserver.SetupStubs(appinfo.application, **option_dict)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 3183, in SetupStubs
rdbms_mysqldb.connect(database='')
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/api/rdbms_mysqldb.py", line 96, in connect
'Unable to find the MySQLdb library. Please see the SDK '
I have tried the hack of adding "import MySQLdb" to the
dev_appserver.py file, but that didn't help.
Any ideas?

Re: MySQL DELIMITER statement not working in Squirrel

DELIMITER is a command for the client to use to know when to send the sql statement.  Squirrel doesn't know about it.

Sqirrel doesn't send the sql when enter is pressed, so it's not needed, just remove the DELIMITER commands.

Rob


MySQL DELIMITER statement not working in Squirrel

I have the following statements that work fine in MySQLWorkbench:
DROP PROCEDURE IF EXISTS test_delimiter;
DELIMITER //
CREATE PROCEDURE test_delimiter()
BEGIN
END//
DELIMITER ;
When I try to run them in Squirrel, I get:
Error: 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 'DELIMITER //
CREATE PROCEDURE test_delimiter()
BEGIN
END//
DELIMITER' at line 1
SQLState: 42000
ErrorCode: 1064
Error occured in:
DELIMITER //
CREATE PROCEDURE test_delimiter()
BEGIN
END//
DELIMITER
Any ideas why?
Also, it would be great to have Cloud SQL support MySQLWorkbench. Is
there a way to connect the two?

Re: Google Cloud SQL preview access

As Joe said in another thread, there's no fixed delay.  We're releasing spaces as resources allow and to try out a range of applications.

Ken

Re: Google Cloud SQL preview access

Hi,

Last time I request and after that about 2 days, google sent me a mail active google cloud sql account. But same to you. Yesterday, I do that with another email but now i am yet to receive active mail from google.
My friend told me that he filled up 3 days ago but now he's yet to receive too.
So I guess, maybe Google stop supporting trying google cloud sql.
I'm not sure.

Just waiting....

Thanks.

--
vì một ngày mai tươi sáng hơn

Tuesday, November 29, 2011

Google Cloud SQL preview access

Hi,
How can i get access to Google Cloud SQL? Though, I have filled up
access request form last week, i am yet to get the access.
Can you please let me know the criteria for giving access to Cloud
SQL?
Regards,
Vikas

Re: Google Apps Script JDBC Service and Google Cloud SQL

Integrating Cloud SQL with Apps Script is being considered. In the meantime, you can write an App Engine service as a wrapper that exposes Cloud SQL data to your Scripts.

-saurabh

Re: Google Apps Script JDBC Service and Google Cloud SQL

Sorry Joe but what is your answer.
I don't get it.
Regards
Laurent

Monday, November 28, 2011

Speed of one operation

Do GSQL scalable for one big operation? I use MySQL for fulltext
search by email database.
For example now I have about 9000 email in my table and fulltext
search take about 50-90ms. Is time dramatically increase when I upload
3000000 emails in my datadase?

--
Blog: www.rekby.ru

Re: Using GCSQL as application backend

Hi Nick

Google Cloud SQL is currently in limited preview. We'll be announcing pricing and sizing before we make it more widely available, which should give you the information you need to make the call

Joe


Joe Faith | Product Manager | Google Cloud SQL

Re: Is is possible to access Google Cloud SQL while running locally?

Make sure that the driver is in your class path and before using getConnection, register the driver with Class.forName("com.mysql.jdbc.Driver")

--Abhishek





Re: Is is possible to access Google Cloud SQL while running locally?

Yes it might have not found the driver. Where did u put your jar for MySQL connector?
--Abhishek


Using GCSQL as application backend

Hi,

I've written an application that's storing some transactional data in Google Cloud SQL

I'm wondering whether this is going to become an issue when I run into DB size and pricing restrictions?

Is the GCSQL intended -only- for reporting and limited unscalable operations, or is it feasible to use it as the sole backend for an application?

Just wondering whether I should port everything to the datastore and what the intentions of the project are

Loving the cloud SQL so far by the way, makes it so easy to utilise the appengine infrastructure whilst making use of existing Java and relational DB skills

Re: Is is possible to access Google Cloud SQL while running locally?

Thanks, that narrowed it down further.
I used c = DriverManager.getConnection("jdbc:mysql://localhost:3306/
mysql55?
user=root&password=******&useInformationSchema=true&useUnicode=true&characterEncoding=UTF8&useServerPrepStmts=true
");
to do it by hand and got an error:
java.sql.SQLException: No suitable driver found for jdbc:mysql://
localhost:3306....
So I'm guessing it isn't able to find the driver but the wiring in the
VM arguements looks good. Any suggestions?

Re: Cloud invite expired

https://code.google.com/apis/console/shp?frag=project:844144627291:activate&a=6&t=?d%3D6%26p%3D844144627291%26t%3D1323125193%23299726251

let us know how you get on

j

--
Joe Faith | Product Manager | Google Cloud SQL

Re: Google Apps Script JDBC Service and Google Cloud SQL

http://groups.google.com/group/google-cloud-sql-discuss/browse_thread/thread/3e083faf69109cc3


--
Joe Faith | Product Manager | Google Cloud SQL

Re: Is is possible to access Google Cloud SQL while running locally?

I suppose mysql55 is your database name, if this is so, then ur variables seems fine. To check the connection url you can write a simple jdbc code n see if u cud get connection object. Try replacing localhost in URL with IP of your machine.
--Abhishek

Re: where can i get detail tutorial for using cloud sql in gae?

If you are interested in it, here is a small post about my tutorial showing how to use googlecloudsql with play + siena :
http://mandubian.tumblr.com/post/13459210142/tutorial-for-googlecloudsql-with-play-1-2-3-siena

It's just a test app so issues might exist. Don't hesitate to report them on siena github or siena google group !

regards
Pascal

Re: Is is possible to access Google Cloud SQL while running locally?

Heh, I noticed that, I'm coming from Oracle where case isn't
important. It is in capital letters as that's the case I'm used too.
But yes, I created my table in uppercase. I tried lower case too just
to be sure. No dice.
What about my VM arguements:
Drdbms.server=local -Drdbms.driver=com.mysql.jdbc.Driver -
Drdbms.url=jdbc:mysql://localhost:3306/mysql55?
user=root&password=******&useInformationSchema=true&useUnicode=true&characterEncoding=UTF8&useServerPrepStmts=true
How do I know the URL is right? Where do I look to make sure this part
'localhost:3306/mysql55' is correct? I just copied the mysql55 part
from the MySQL Workbench
Thanks for your suggestions

Re: how to use cursor.executemany?

I don't think the %s should be in quotes.

Rob


Re: trigger (delimiter)

Yes it is, but entering these kind of commands through the browser-based input box may not be the best option.
I had more luck trying to create triggers and procedures (and changing the delimiter) through the command line tool or the Squirrel SQL client.


Re: Is is possible to access Google Cloud SQL while running locally?

Your table name is in capital letters or is in proper case? MySql is case-sensitive and could say table not found even if table exists but is in different case.

--Abhishek

Re: Is is possible to access Google Cloud SQL while running locally?

I remove the Schema and I get this:
java.sql.SQLException: Table not found in statement [SELECT * FROM
MYTABLE]

Re: Is is possible to access Google Cloud SQL while running locally?

I ask because I keep getting:
Error listing items: java.sql.SQLException: invalid schema name:
MILKRUN in statement [SELECT * FROM TESTDB.MYTABLE]
Even though I can execute that query fine within the MySQL Workbench.
Where is rmdbs.url stored?

Sunday, November 27, 2011

Is is possible to access Google Cloud SQL while running locally?

From what I've read it doesn't look like it but I didn't really
understand the external connection thing.

I'm having problems creating my own MySQL instance and getting it to
work with my dev env and even still it would be a challenge to
maintain them both. Is it possible to run my application locally but
point to GCSQL?

trigger (delimiter)

I have a problem with creating trigger. Command "delimiter |" doesn't
work alone nor together with CREATE TRIGGER command. Is it possible to
create triggers (procedures) in sql cloud?

delimiter |

CREATE TRIGGER trigger_name AFTER INSERT ON tablex
FOR EACH ROW BEGIN
.......
END;
|

delimiter ;

Saturday, November 26, 2011

how to use cursor.executemany?

code:
========
wkL = [("11111111111",), ("22222222222",), ("3333333333333",)]
#or wkL = ["11111111111","22222222222","3333333333333"]
cursor.executemany( u"insert into entries ( guestName, content )
values( '%s', 'ZZZZZZZZZZZ' )", wkL )

error
========
File "/base/data/home/apps/s~chatthor/1.354968998651775855/2.py",
line 19, in get
cursor.executemany( u"insert into entries ( guestName, content )
values( '%s', 'ZZZZZZZZZZZ' )", wkL )
File "/base/python27_runtime/python27_lib/versions/1/google/storage/
speckle/python/api/rdbms.py", line 344, in executemany
self.execute(statement, args)
File "/base/python27_runtime/python27_lib/versions/1/google/storage/
speckle/python/api/rdbms.py", line 290, in execute
response = self._conn.MakeRequest('Exec', request)
File "/base/python27_runtime/python27_lib/versions/1/google/storage/
speckle/python/api/rdbms.py", line 596, in MakeRequest
response = self._MakeRetriableRequest(stub_method, request)
File "/base/python27_runtime/python27_lib/versions/1/google/storage/
speckle/python/api/rdbms.py", line 620, in _MakeRetriableRequest
response = self.MakeRequestImpl(stub_method, request)
File "/base/python27_runtime/python27_lib/versions/1/google/storage/
speckle/python/api/rdbms_apiproxy.py", line 68, in MakeRequestImpl
raise OperationalError('could not connect: ' + str(e))
OperationalError: could not connect: ApplicationError: 1006
mysql_stmt_param_count: Not all variables bound. Got 1, expected 0.

Re: Google Apps Script JDBC Service and Google Cloud SQL

I'm definitely interested in this as well.  We have a client who is easily going to exceed the max number of cells in a Google spreadsheet with their Google sites collaboration application.
So we're looking at going directly into a MySQL database and would prefer to use Google Cloud SQL accessible from Google appscript and using the JDBC services: http://code.google.com/googleapps/appsscript/class_jdbc.html to access the tables.

How can we do this as it appears you're currently imposing a limitation of only Google App Engine instances being able to access Google Cloud SQL instances?  It appears to be simply a matter of Google enabling JDBC access from their Google Apps servers. It's an internal change so shouldn't be a drama. The JDBC services for Appscript are fully MySQL compliant so their shouldn't be any technical issues.

P.S. And yes, we have to use Google sites/appscript as this is imposed by the customer. GAE is not an option (currently!)

Regards,

Geoff

Friday, November 25, 2011

Re: Triggers / Stored procedures?

Yes it has initially you have to create from sql window and after that using program, you can call that proc.

 Thank you.

Regards,
Bhargava Sriram A.

Triggers / Stored procedures?

As far as I can tell, the documentation is not entirely clear about
this - are triggers/stored procedures supported?

Thanks,

Giovanni

Re: where can i get detail tutorial for using cloud sql in gae?

Yes but let me write it please :D

Re: where can i get detail tutorial for using cloud sql in gae?

thank you.
but what i need is a documentation.

Re: where can i get detail tutorial for using cloud sql in gae?

This is my purpose...
The demo already works there!
http://tweetsql.appspot.com/

I needed to update play-gae module to upgrade it to SDK 1.6.0 and also to customize a bit play-siena to use GoogleCloudSQL because this is MySQL but not exactly.

I will publish the code also to help people begin with it (and test a bit further than me all of this stuff ;))

Pascal


Re: where can i get detail tutorial for using cloud sql in gae?

Thanks a lot Pascal, please share it to all.

 Thank you.

Regards,
Bhargava Sriram A.


Re: where can i get detail tutorial for using cloud sql in gae?

I'm writing a tutorial for Play Framework + Siena Project.
Should publish it early next week!

regards
Pascal


Re: where can i get detail tutorial for using cloud sql in gae?

my examples:
from google.appengine.api import rdbms
conn = rdbms.connect(instance='projectname:instancename',
database='database_name', charset='utf8') # charset - for dev-server
cursor = conn.cursor()
cursor.execute('DELETE FROM `email` WHERE id=%s', [id])
cursor.close()
cursor = conn.cursor()
cursor.execute(u'REPLACE INTO `email` (`id`, `time`, `from`, `to`,
`subject`, `comment`, `text`) VALUES (%s, %s, %s, %s, %s, %s, %s)',
[email.id(), email.Time.strftime('%Y-%m-%d--%H-%M-%S'), email.From,
email.To, email.Subject, email.Comment, email.Text])
cursor.close()
cursor = conn.cursor()
cursor.execute("select from email WHERE `from`=%s", ['asd@mail.ru'])
result = cursor.fetchall()
for row in result:
...

where can i get detail tutorial for using cloud sql in gae?

the example code is too simple. i need detail tutorials for the conn
and curcor and other way to deal the data.

Re: Sql Syntax Error

Hi,

I think there is a extra comma in the end (the red one) --->  oth + "' ,)";

--Abhishek

Sql Syntax Error

Hai Team,
             while running my project from ecilpse i am getting this following error
1.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 ')' at line 1
2.I tried to set the value manually in that case it working fine

Here is my code,tell me that what mistake i have done in that code

  String statement ="INSERT INTO stock (systemno,username,
systemipadd,servicetagno,cpumodel,monitor,webcam,mouse,keyboard,headset,ethernetcable,vgacable,powercable,otherdevices) VALUES('" + sn + "', '" + un + "','" + sip + "','" + sip + "','" + stn + "','" + cpu + "','" + mon + "', '" + web + "','" + mouse + "' , '" + key + "' ,'" + head + "' , '" + enc + "'  ,'" + vgc + "'  , '" + pwc + "' ,'" + oth + "' ,)";
          PreparedStatement stmt = c.prepareStatement(statement);
          stmt.setString(1, sn);
          stmt.setString(2, un);
          stmt.setString(3, sip);
          stmt.setString(4, stn);
          stmt.setString(5, cpu);
          stmt.setString(6, mon);
          stmt.setString(7, web);
          stmt.setString(8, mouse);
          stmt.setString(9, key);
          stmt.setString(10, head);
          stmt.setString(11, enc);
          stmt.setString(12, vgc);
          stmt.setString(13, pwc);
          stmt.setString(14, oth);
          int success = 2;
          success = stmt.executeUpdate(statement);
Thanks
Sasikala

Thursday, November 24, 2011

Re: Can we use same instance for more than one app ID?

Awesome, Thanks it works!!

- Bala

Re: Can we use same instance for more than one app ID?

Try changing your instance to a bigger size.

Ken 

Can we use same instance for more than one app ID?

Hi Team,

Can we access same instance / DB from more than one GAE application? while I was trying its saying "You have reached maximum number of authorized applications" even though it has only one enables.

Thanks,
Bala

Cloud invite expired

Hi,

I was just going through old emails and saw my cloud invite.
Unfortunately it has expired. Do I need to re-register or can I get
the invite sent again.

Thanks for your time.

Wednesday, November 23, 2011

Re: App Engine to connect cloud sql with error: ApplicationError: 1007 Invalid connection id

Connection has a ping() method.
Also it takes roughly the same amount of time to check connection validity as opening a new connection, so it might be easier to open a new connection at the beginning of each request and close it in the end.

Here's the doc:
def ping(self, reconnect=False):
    """Checks whether or not the connection to the server is working.

    If it has gone down, an automatic reconnection is attempted.

    This function can be used by clients that remain idle for a long while, to
    check whether or not the server has closed the connection and reconnect if
    necessary.

    Non-standard. You should assume that ping() performs an implicit rollback;
    use only when starting a new transaction.  You have been warned.

    Args:
      reconnect: Whether to perform an automatic reconnection.

    Raises:
      DatabaseError: The connection to the server is not working.
    """

Re: App Engine to connect cloud sql with error: ApplicationError: 1007 Invalid connection id

Hi Tony,
Thanks for your quick reply.
Could you tell me how to valid the connection?
The codes in my local dev environment worked well without any problem,
and it also worked without any problem in App Engine platform before
yesterday. That's so wired. And the problem still exist after I
restart the instance.

Re: App Engine to connect cloud sql with error: ApplicationError: 1007 Invalid connection id

Hi John,
The connection can become invalid for a variety of reasons. You'll need to check to see if the connection is valid before you use it.


App Engine to connect cloud sql with error: ApplicationError: 1007 Invalid connection id

I am using app engine on python to connect the Cloud SQL, and it
worked well for few days. But from yesterday, I got the error for any
database query:
OperationalError: could not connect: ApplicationError: 1007 Invalid
connection id.

In my python codes, I used singleton pattern to maintain one
connection for all my database operations, and I am not sure that
caused the problem.

Re: Mistake in documentstion,

OK.

Re: Mistake in documentstion,

Hi Timofey,

Mistake in documentstion,

http://code.google.com/intl/en/appengine/docs/python/memcache/functions.html don't describe for_cas parameter for function get.

--
Blog: www.rekby.ru

Re: anybody running django on the app engine with the sql service?

I think a good way to connect could be using the remote api, but is not available neither planned.

Star this issue http://code.google.com/p/googlecloudsql/issues/detail?id=21 if you think would be helpful.

-Sebastian
www.devsar.com

Re: Using Cloud SQL via App Engine Remote API

I think this wold actually be a useful feature for a fair number of developers.

I've submitted a ticket: http://code.google.com/p/googlecloudsql/issues/detail?id=21

Richard


Re: No response for Google Cloud SQL Signup

Most of you people get their requests fulfilled after holidays.

 Thank you.

Regards,
Bhargava Sriram A.



No response for Google Cloud SQL Signup

I have fill the request form days ago and i haven't have response.

How many days will have i to wait?

I am really interested in test this service because that many projects
in that i work, run on MySQL.

Tuesday, November 22, 2011

Re: Using Cloud SQL via App Engine Remote API

I +1 this, because it would make easier the integration with django as it would make simple to add support of syncdb and schema migrations with the management commands.

Cheers, Sebastian

Re: Any way to change cloud sql instance global variable values

Sorry. This feature is not currently supported.


What if I create a new instance, give its name to you guys to set  just one variable value for me? Is it possible?

-- Abhishek




Re: Using Cloud SQL via App Engine Remote API


Hello,

I understand that I can use the command line client.

But the App Engine Remote API allows me to run my App Engine code and access Datastore entities from a remote client. Do you think there will be a Cloud SQL stub implemented for this at some point?



Not currently planned.  You can file something in the tracker and we'll see if other people want something similar.  http://code.google.com/p/googlecloudsql/

Ken 

Re: Any way to change cloud sql instance global variable values

What if I create a new instance, give its name to you guys to set  just one variable value for me? Is it possible?

-- Abhishek


Re: Using Cloud SQL via App Engine Remote API

Hello,

I understand that I can use the command line client.

But the App Engine Remote API allows me to run my App Engine code and access Datastore entities from a remote client. Do you think there will be a Cloud SQL stub implemented for this at some point?

Richard

Connection caching and sharing

Hello,

I'm sharing and caching a database connection in my Python App Engine for each instance by holding a reference to the connection at module level. Something like this:

_conn = None

def get_connection():
  global _conn
  
  if _conn is None:
    _conn = rdbms.connect(...)  
  return _conn

This seems to work OK and so far I haven't seen any problems with the connection timing etc.

Does anyone know if this is a good idea? Could I run into threading problems etc. At the moment each instance only served one request at a time but our app will be switching to multi-threaded Python2.7 soon. 

Is there any way of detecting a connection has become disconnected or timed-out and re-connect?

Regards
Richard





Re: Any way to change cloud sql instance global variable values

Hi Abhishek,
Unfortunately cloud sql does not support user-specified startup options at this point.

Re: Any way to change cloud sql instance global variable values

You can give your tables names in the correct case?



Cloud SQL limited preview

Dear Cloud SQL Limited Previewers

This is a friendly reminder that Cloud SQL is currently in limited preview: that means we are offering it on a limited basis to selected developers so that they can preview its capabilities and allow us to improve the service, and it is currently offered without performance or availability guarantees.

Cloud SQL is not currently recommended for mission-critical or high-intensity production applications.

While evaluating Cloud SQL we would ask you to bear in mind the following:
  • All your data is multiply geographically replicated, but we do not currently offer an automated backup service. Backups can be taken manually through the Google Cloud SQL dashboard (under 'Actions').

  • Synchronous replication also has an impact on write performance compared to non-replicated local disk. This especially affects bulk data imports. There are useful tips on optimising bulk imports here:
    http://dev.mysql.com/doc/refman/5.5/en/optimizing-innodb-bulk-data-loading.html

  • Also bear in mind that many queries also involve writing to disk, for example those involving 'order by' clauses, and that these will also be slowed by replication. There are useful tips on optimising such queries here:
    http://dev.mysql.com/doc/refman/5.5/en/order-by-optimization.html

Let me know if you have any questions

thanks

J

--
Joe Faith | Product Manager | Google Cloud SQL