Happy New Year :)
--Abhishek
Google Cloud SQL unofficial blog --- Google Cloud SQL is a fully-managed database service that makes it easy to set-up, maintain, manage and administer your relational MySQL databases
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.
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.
Thanks
Dustin
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)
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?
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
How to connect from ide tool development, what's the string
connection??
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.
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.
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?