Friday, August 31, 2012

Re: _last_executed cursor property

I've posted your question to the django tracker https://code.djangoproject.com/ticket/18886

Yes, there is a difference, see #14091.

I hope this helps. 

On Thu, Aug 30, 2012 at 11:25 PM, Ken Ashcraft <kash@google.com> wrote:
Using a protected field in the mysql driver seems like the wrong thing for django to do.  Is there a substantial difference between the default implementation of last_executed_query() and the one returned by the mysql version?

    def last_executed_query(self, cursor, sql, params):
        """
        Returns a string of the query last executed by the given cursor, with
        placeholders replaced with actual values.

        `sql` is the raw query containing placeholders, and `params` is the
        sequence of parameters. These are used by default, but this method
        exists for database backends to provide a better implementation
        according to their own quoting schemes.
        """
        from django.utils.encoding import smart_unicode, force_unicode

        # Convert params to contain Unicode values.
        to_unicode = lambda s: force_unicode(s, strings_only=True, errors='replace')
        if isinstance(params, (list, tuple)):
            u_params = tuple([to_unicode(val) for val in params])
        else:
            u_params = dict([(to_unicode(k), to_unicode(v)) for k, v in params.items()])

        return smart_unicode(sql) % u_params


On Wed, Aug 29, 2012 at 5:11 PM, bika <akasha.bika@gmail.com> wrote:
sorry, my mail was a bit misleading, it was meant to draw your attention to the fact that your dbapi driver does not have this property despite claiming to be 100% mysql compatible

please, consider my mail either as a bug report

thanks, V


On Wed, Aug 29, 2012 at 7:50 PM, Rob Clevenger <rcleveng@google.com> wrote:
Hi,

Our dbapi driver doesn't have this field.

Rob


On Tue, Aug 28, 2012 at 7:27 AM, Bika <akasha.bika@gmail.com> wrote:
from the django/db/backends/mysql/base.py
# With MySQLdb, cursor objects have an (undocumented) "_last_executed"
# attribute where the exact query sent to the database is saved.
# See MySQLdb/cursors.py in the source distribution.

Is there a way to access the last executed query string using cloud sql?




Thursday, August 30, 2012

Re: _last_executed cursor property

Using a protected field in the mysql driver seems like the wrong thing for django to do.  Is there a substantial difference between the default implementation of last_executed_query() and the one returned by the mysql version?

    def last_executed_query(self, cursor, sql, params):
        """
        Returns a string of the query last executed by the given cursor, with
        placeholders replaced with actual values.

        `sql` is the raw query containing placeholders, and `params` is the
        sequence of parameters. These are used by default, but this method
        exists for database backends to provide a better implementation
        according to their own quoting schemes.
        """
        from django.utils.encoding import smart_unicode, force_unicode

        # Convert params to contain Unicode values.
        to_unicode = lambda s: force_unicode(s, strings_only=True, errors='replace')
        if isinstance(params, (list, tuple)):
            u_params = tuple([to_unicode(val) for val in params])
        else:
            u_params = dict([(to_unicode(k), to_unicode(v)) for k, v in params.items()])

        return smart_unicode(sql) % u_params


On Wed, Aug 29, 2012 at 5:11 PM, bika <akasha.bika@gmail.com> wrote:
sorry, my mail was a bit misleading, it was meant to draw your attention to the fact that your dbapi driver does not have this property despite claiming to be 100% mysql compatible

please, consider my mail either as a bug report

thanks, V


On Wed, Aug 29, 2012 at 7:50 PM, Rob Clevenger <rcleveng@google.com> wrote:
Hi,

Our dbapi driver doesn't have this field.

Rob


On Tue, Aug 28, 2012 at 7:27 AM, Bika <akasha.bika@gmail.com> wrote:
from the django/db/backends/mysql/base.py
# With MySQLdb, cursor objects have an (undocumented) "_last_executed"
# attribute where the exact query sent to the database is saved.
# See MySQLdb/cursors.py in the source distribution.

Is there a way to access the last executed query string using cloud sql?



Re: Can't connect to Cloud SQL when deployed on App Engine

The problem was in our connection-establishing code that caused an exception when deployed and our logging wasn't setup properly.  So the issue was in my end and it is resolved.

For anyone else wondering, billed Cloud SQL and free App Engine should work fine together as per instructions in the documentation.

Thanks for your help, Razvan.


On Tuesday, August 28, 2012 3:37:54 PM UTC-7, Razvan Musaloiu-E. wrote:
Can you tell me (off the list) your project id? Were you able to connect to the cloud mysql instance using the command line tool [1]?


-- Razvan ME


On Tue, Aug 28, 2012 at 3:34 PM, Baron <ba...@deca.tv> wrote:
Hello, I have billing enabled for Cloud SQL and using App Engine for free.  

Connecting to the database works fine developing locally, but when I deploy to app engine and run it in production I don't get any results back.  
The Admin Logs state "API serving not allowed for this application".  There are no stack traces or anything in the logs.  I have authorized the app engine application in the Cloud SQL instance.

Does this mean I need to enable billing for App Engine?

I saw an answer about applying for Endpoints access but I don't think I'm using Endpoints.

Wednesday, August 29, 2012

Re: _last_executed cursor property

bug filed

I was trying to find an exact wording on MySQL compatibility, and you are right there is no such claim. Still, as you refer to the mysql docs in the developers' guide, it gives the idea of being compatible.

e.g. 
Django is a popular third-party Python web framework. When coupled with Google Cloud SQL, all of its functionality can be fully supported by applications running on App Engine. Support for using Google Cloud SQL with Django is provided by a custom Django database backend which wraps Django's MySQL backend.

On the other hand you are perfectly right about not claiming to be compatible:
The Python Development Server in the Google App Engine SDK can use a locally-installed MySQL server instance to closely mirror the Google Cloud SQL environment during development.

I hope these clarify why I thought that you aim for compatibility in APIs. 

On Thu, Aug 30, 2012 at 2:20 AM, Tony Tseng <ttt@google.com> wrote:
Please file a bug on http://code.google.com/p/googlecloudsql/issues/list.

Also could you tell us where you saw the compatibility claim for the dbapi driver? I didn't see that on https://developers.google.com/appengine/docs/python/cloud-sql/developers-guide.

On Wed, Aug 29, 2012 at 5:11 PM, bika <akasha.bika@gmail.com> wrote:
sorry, my mail was a bit misleading, it was meant to draw your attention to the fact that your dbapi driver does not have this property despite claiming to be 100% mysql compatible

please, consider my mail either as a bug report

thanks, V


On Wed, Aug 29, 2012 at 7:50 PM, Rob Clevenger <rcleveng@google.com> wrote:
Hi,

Our dbapi driver doesn't have this field.

Rob


On Tue, Aug 28, 2012 at 7:27 AM, Bika <akasha.bika@gmail.com> wrote:
from the django/db/backends/mysql/base.py
# With MySQLdb, cursor objects have an (undocumented) "_last_executed"
# attribute where the exact query sent to the database is saved.
# See MySQLdb/cursors.py in the source distribution.

Is there a way to access the last executed query string using cloud sql?




Re: _last_executed cursor property

Please file a bug on http://code.google.com/p/googlecloudsql/issues/list.

Also could you tell us where you saw the compatibility claim for the dbapi driver? I didn't see that on https://developers.google.com/appengine/docs/python/cloud-sql/developers-guide.

On Wed, Aug 29, 2012 at 5:11 PM, bika <akasha.bika@gmail.com> wrote:
sorry, my mail was a bit misleading, it was meant to draw your attention to the fact that your dbapi driver does not have this property despite claiming to be 100% mysql compatible

please, consider my mail either as a bug report

thanks, V


On Wed, Aug 29, 2012 at 7:50 PM, Rob Clevenger <rcleveng@google.com> wrote:
Hi,

Our dbapi driver doesn't have this field.

Rob


On Tue, Aug 28, 2012 at 7:27 AM, Bika <akasha.bika@gmail.com> wrote:
from the django/db/backends/mysql/base.py
# With MySQLdb, cursor objects have an (undocumented) "_last_executed"
# attribute where the exact query sent to the database is saved.
# See MySQLdb/cursors.py in the source distribution.

Is there a way to access the last executed query string using cloud sql?



Re: _last_executed cursor property

sorry, my mail was a bit misleading, it was meant to draw your attention to the fact that your dbapi driver does not have this property despite claiming to be 100% mysql compatible

please, consider my mail either as a bug report

thanks, V

On Wed, Aug 29, 2012 at 7:50 PM, Rob Clevenger <rcleveng@google.com> wrote:
Hi,

Our dbapi driver doesn't have this field.

Rob


On Tue, Aug 28, 2012 at 7:27 AM, Bika <akasha.bika@gmail.com> wrote:
from the django/db/backends/mysql/base.py
# With MySQLdb, cursor objects have an (undocumented) "_last_executed"
# attribute where the exact query sent to the database is saved.
# See MySQLdb/cursors.py in the source distribution.

Is there a way to access the last executed query string using cloud sql?


Re: Error connecting to Google Cloud

Hello Rob,
   I create a project called Guestbook from Eclipse , and I am running it from Eclipse by right click on the project name and hit on run as -> Web application. Here is the console line confimed it
"Aug 29, 2012 4:04:25 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at http://localhost:8888/_ah/admin"

I then go to IE, and run my project as http://localhost:8888/guestbook

and I get correction error as I explained in the previous email. The connection error is "java.lang.

IllegalStateException: System property rdbms.driver must be set at com.google.appengine.api.rdbms.dev.LocalRdbmsServiceLocalDriver.registerDriver(LocalRdbmsServiceLocalDriver.java:80)"



Please let me know if you need additional information.



Thanks again,


Minh



 

On Wednesday, August 29, 2012 3:54:24 PM UTC-4, Rob wrote:
Are you running this from the commandline or from inside of Eclipse?  How are you running this? Please provide command you type or menu items used to launch the devmode server.

thanks,
Rob

On Wed, Aug 29, 2012 at 12:51 PM, Mike <dtr...@student.gsu.edu> wrote:

I am new to Google App engine and I have tried to run an demo application called guestbook to connect to Google cloud sql from the Google app engine with app-engine-sdk version 1-7.0. But each time I am getting an error saying "java.lang.IllegalStateException: System property rdbms.driver must be set at com.google.appengine.api.rdbms.dev.LocalRdbmsServiceLocalDriver.registerDriver(LocalRdbmsServiceLocalDriver.java:80)". I double check my code and every thing looks ok, and I still have no glue where the error coming from.

Below is a snippet of my connection code :

c = DriverManager.getConnection("jdbc:google:rdbms://my_instance/my_database");

and mysql-connector-java-5.1.21-bin is in the class path,

and I have enable Google cloud sql in the Google app engine,

and I have checked the use of Google Cloud instance in the app engine as well with the my instance of the database, database name, login , and password,

and I am using Eclipse Juno.

I think I have missed something important; so would you please help me if you know what I have missed.

Thank you very much in advance,

Minh


Re: Error connecting to Google Cloud

Are you running this from the commandline or from inside of Eclipse?  How are you running this? Please provide command you type or menu items used to launch the devmode server.

thanks,
Rob

On Wed, Aug 29, 2012 at 12:51 PM, Mike <dtran7@student.gsu.edu> wrote:

I am new to Google App engine and I have tried to run an demo application called guestbook to connect to Google cloud sql from the Google app engine with app-engine-sdk version 1-7.0. But each time I am getting an error saying "java.lang.IllegalStateException: System property rdbms.driver must be set at com.google.appengine.api.rdbms.dev.LocalRdbmsServiceLocalDriver.registerDriver(LocalRdbmsServiceLocalDriver.java:80)". I double check my code and every thing looks ok, and I still have no glue where the error coming from.

Below is a snippet of my connection code :

c = DriverManager.getConnection("jdbc:google:rdbms://my_instance/my_database");

and mysql-connector-java-5.1.21-bin is in the class path,

and I have enable Google cloud sql in the Google app engine,

and I have checked the use of Google Cloud instance in the app engine as well with the my instance of the database, database name, login , and password,

and I am using Eclipse Juno.

I think I have missed something important; so would you please help me if you know what I have missed.

Thank you very much in advance,

Minh


re: Error connecting to Google Cloud

I am new to Google App engine and I have tried to run an demo application called guestbook to connect to Google cloud sql from the Google app engine with app-engine-sdk version 1-7.0. But each time I am getting an error saying "java.lang.IllegalStateException: System property rdbms.driver must be set at com.google.appengine.api.rdbms.dev.LocalRdbmsServiceLocalDriver.registerDriver(LocalRdbmsServiceLocalDriver.java:80)". I double check my code and every thing looks ok, and I still have no glue where the error coming from.

Below is a snippet of my connection code :

c = DriverManager.getConnection("jdbc:google:rdbms://my_instance/my_database");

and mysql-connector-java-5.1.21-bin is in the class path,

and I have enable Google cloud sql in the Google app engine,

and I have checked the use of Google Cloud instance in the app engine as well with the my instance of the database, database name, login , and password,

and I am using Eclipse Juno.

I think I have missed something important; so would you please help me if you know what I have missed.

Thank you very much in advance,

Minh

Re: _last_executed cursor property

Hi,

Our dbapi driver doesn't have this field.

Rob

On Tue, Aug 28, 2012 at 7:27 AM, Bika <akasha.bika@gmail.com> wrote:
from the django/db/backends/mysql/base.py
# With MySQLdb, cursor objects have an (undocumented) "_last_executed"
# attribute where the exact query sent to the database is saved.
# See MySQLdb/cursors.py in the source distribution.

Is there a way to access the last executed query string using cloud sql?

Can't connect to my instance

Everything was working normally until yesterday; from this morning I can't connect anymore to my instance/database.

I basically get a similar connecting error message from App Engine code (see below), the API console ('failed to load databases'), and Squirrel client.

Instance name is: google.com:webpush:webpush

Thanks for assistance!

  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/rdbms.py", line 69, in connect      password=password)    File "/base/python_runtime/python_lib/versions/1/google/storage/speckle/python/api/rdbms.py", line 583, in __init__      self.OpenConnection()    File "/base/python_runtime/python_lib/versions/1/google/storage/speckle/python/api/rdbms.py", line 606, in OpenConnection      response = self.MakeRequest('OpenConnection', request)    File "/base/python_runtime/python_lib/versions/1/google/storage/speckle/python/api/rdbms.py", line 713, in MakeRequest      response = self.MakeRequestImpl(stub_method, request)    File "/base/python_runtime/python_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: 2 Internal error.

Tuesday, August 28, 2012

Re: Can't connect to Cloud SQL when deployed on App Engine

Can you tell me (off the list) your project id? Were you able to connect to the cloud mysql instance using the command line tool [1]?


-- Razvan ME


On Tue, Aug 28, 2012 at 3:34 PM, Baron <baron@deca.tv> wrote:
Hello, I have billing enabled for Cloud SQL and using App Engine for free.  

Connecting to the database works fine developing locally, but when I deploy to app engine and run it in production I don't get any results back.  
The Admin Logs state "API serving not allowed for this application".  There are no stack traces or anything in the logs.  I have authorized the app engine application in the Cloud SQL instance.

Does this mean I need to enable billing for App Engine?

I saw an answer about applying for Endpoints access but I don't think I'm using Endpoints.

Can't connect to Cloud SQL when deployed on App Engine

Hello, I have billing enabled for Cloud SQL and using App Engine for free.  

Connecting to the database works fine developing locally, but when I deploy to app engine and run it in production I don't get any results back.  
The Admin Logs state "API serving not allowed for this application".  There are no stack traces or anything in the logs.  I have authorized the app engine application in the Cloud SQL instance.

Does this mean I need to enable billing for App Engine?

I saw an answer about applying for Endpoints access but I don't think I'm using Endpoints.

_last_executed cursor property

from the django/db/backends/mysql/base.py
# With MySQLdb, cursor objects have an (undocumented) "_last_executed"
# attribute where the exact query sent to the database is saved.
# See MySQLdb/cursors.py in the source distribution.

Is there a way to access the last executed query string using cloud sql?

Monday, August 27, 2012

Error when I call a stored procedure on Cloud SQL in python2.7


Hi,
We're trying to call a stored procedure on Cloud SQL in python2.7.
Here's our simple code:

# stored procedure
CREATE PROCEDURE Test_Procedure (_nmbr INT)
BEGIN
INSERT INTO TEST(AA) VALUES(_nmbr);
SELECT * FROM TEST;
END;

# code in python
conn = rdbms.connect(instance = _INSTANCE_NAME, database = _DATABASE_NAME)
cursor = conn.cursor()

cursor.execute("call Test_Procedure(%s)", (50))
results = cursor.fetchall()
for row in results :
self.response.out.write(str(row[0]))

conn.close()

When I executed the procedure on SQL Prompt, it worked very well, but when I tried to execute it by python code, I've gotten this error message.
InternalError: fetchall() called before execute

Do I have to do something else when I execute a stored procedure in python code??

Saturday, August 25, 2012

Re: Can't create new instance

It worked! 

It actually returned an error, but refreshing the page showed that it had created the database instance correctly. The problem was with refreshing the page listing all the database instances.

Thank you,
Jason B.



On Sat, Aug 25, 2012 at 6:54 PM, Razvan Musaloiu-E. <razvanm@google.com> wrote:
Can you please try again now?

-- Razvan ME


On Sat, Aug 25, 2012 at 1:08 PM, JasonB <jbowman@trutechconsulting.com> wrote:

Tony,

Unfortunately I am also getting the same error. I have disabled and re-enabled billing, waited several minutes, but still can not create a new Cloud SQL instance "because billing is disabled". 

My project ID is: 928506152932

Thank you for any assistance you can provide.
- Jason B. 

Re: Can't create new instance

Can you please try again now?

-- Razvan ME


On Sat, Aug 25, 2012 at 1:08 PM, JasonB <jbowman@trutechconsulting.com> wrote:

Tony,

Unfortunately I am also getting the same error. I have disabled and re-enabled billing, waited several minutes, but still can not create a new Cloud SQL instance "because billing is disabled". 

My project ID is: 928506152932

Thank you for any assistance you can provide.
- Jason B. 

On Saturday, August 11, 2012 7:06:43 PM UTC-4, Tony Tseng wrote:
Should be fixed now. Please try again.


Re: Can't create new instance


Tony,

Unfortunately I am also getting the same error. I have disabled and re-enabled billing, waited several minutes, but still can not create a new Cloud SQL instance "because billing is disabled". 

My project ID is: 928506152932

Thank you for any assistance you can provide.
- Jason B. 

On Saturday, August 11, 2012 7:06:43 PM UTC-4, Tony Tseng wrote:
Should be fixed now. Please try again.

Wednesday, August 22, 2012

Re: Google Cloud SQL hanging on import

That did the trick. Thanks!

For those who have come here from a search engine, you get the process ids from running SHOW FULL PROCESSLIST.  Then KILL <processid> for the process that you think is holding everything up.

On Wednesday, August 22, 2012 12:18:14 PM UTC-4, Razvan Musaloiu-E. wrote:
I believe there are a bunch of stuck queries that caused this. Can you connect to the instance and KILL [1] them? If that doesn't get the instance in a happy state let me know and I'll restart it.


-- Razvan ME


On Wed, Aug 22, 2012 at 9:09 AM, ahroth <aviv...@gmail.com> wrote:
The instance is google-agency:cobi-agency, and the import was begun at 4:07AM PDT this morning.  I usually interact with Google Cloud SQL via Google App Engine  (Python), but in this case, I was using the web UI to interact with it directly.

Re: Google Cloud SQL hanging on import

I believe there are a bunch of stuck queries that caused this. Can you connect to the instance and KILL [1] them? If that doesn't get the instance in a happy state let me know and I'll restart it.


-- Razvan ME


On Wed, Aug 22, 2012 at 9:09 AM, ahroth <avivroth@gmail.com> wrote:
The instance is google-agency:cobi-agency, and the import was begun at 4:07AM PDT this morning.  I usually interact with Google Cloud SQL via Google App Engine  (Python), but in this case, I was using the web UI to interact with it directly.

Re: Google Cloud SQL hanging on import

The instance is google-agency:cobi-agency, and the import was begun at 4:07AM PDT this morning.  I usually interact with Google Cloud SQL via Google App Engine  (Python), but in this case, I was using the web UI to interact with it directly.

Google Cloud SQL hanging on import

Hello,

I started importing a mysqldump into a database instance about 2 hours ago, and it's still running.  I'm willing to restart, or even to *delete* the instance, but both restart and delete are disabled.

I know that the dump is fine, because I imported into a brand new instance without any issue, and it was done in 12 minutes.

How do I stop the process and then delete this (clearly wonky) instance?

Thanks!
-Aviv

Thursday, August 16, 2012

Re: Eclipse (Android) -> Cloud SQL Server

Hi Marcelo,

You cannot connect directly to Cloud SQL -- you're going to need some "middleware" to expose a web service in App Engine.  You should take a look at the new AppEngine Cloud Endpoints --- it can even help you generate some Java wrapper code to work with your App Engine app.

Pseudo code in AppEngine (Just for an idea, don't actually do this exact code.....)

def get_widget(self, id):
  return conn.execute("select * from widgets where id=%d" % id)

On Wednesday, August 15, 2012 2:42:55 PM UTC-6, Marcelo wrote:
Hi,

I´m trying to make my eclipse APP Adroid talk to Cloud SQL Server. I did 4 steps below:

1-Create a Cloud SQL account - OK
2-Import the data and scheme to it  - OK
3-Create an AppEngine Application - OK
4-Allow the AppEngine app id access to the Cloud SQL- OK

BUT, here´s my problem:

5- "Create an application that android can access and talk to your cloud sql" - X

In step 5 "Create an application that android can access and talk to your cloud sql" i can´t find anything or any piece of code in developers or tutorial to help me to make the 2 sides talk. (Android (Eclipse) with Cloud SQL Server).

Can anyone help me? Another question is, Cloud SQL can only comunicate with an WebService? Can i make the comunication without WebService? Ca i do the code directly in eclipse withou webservice?



Re: Eclipse (Android) -> Cloud SQL Server

do you have any piece of code?

On Wednesday, August 15, 2012 6:58:37 PM UTC-3, Ken Ashcraft wrote:
On Wed, Aug 15, 2012 at 2:21 PM, Marcelo <mca...@gmail.com> wrote:
got it...

Last question.

is this relantionship based in WebService?


Sorry, but I don't know what WebService is, nor do I understand what relationship you are referring to.
 


On Wednesday, August 15, 2012 6:13:24 PM UTC-3, Ken Ashcraft wrote:
On Wed, Aug 15, 2012 at 2:03 PM, Marcelo <mca...@gmail.com> wrote:
GAE = Google App Engine? If it is i already have this installed in my eclipse.


Yes.
 
What I need really is a "light" to start iniciate my code.


Look for tutorials on using Android and GAE.  At that point, Cloud SQL should be completely hidden behind GAE and is just an implementation detail of the GAE app.

Hope that helps,
Ken
 

On Wednesday, August 15, 2012 5:58:19 PM UTC-3, Ken Ashcraft wrote:
Your GAE app should expose an API that the android app will use.

Android -> GAE -> Cloud SQL

That way, the GAE app can enforce application-level rules about who is allowed to see what data.  Furthermore, it is far easier to make changes to the GAE app than it is to push out changes to the android app because you can't control when users upgrade the app on their phones.

Ken


On Wed, Aug 15, 2012 at 1:42 PM, Marcelo <mca...@gmail.com> wrote:
Hi,

I´m trying to make my eclipse APP Adroid talk to Cloud SQL Server. I did 4 steps below:

1-Create a Cloud SQL account - OK
2-Import the data and scheme to it  - OK
3-Create an AppEngine Application - OK
4-Allow the AppEngine app id access to the Cloud SQL- OK

BUT, here´s my problem:

5- "Create an application that android can access and talk to your cloud sql" - X

In step 5 "Create an application that android can access and talk to your cloud sql" i can´t find anything or any piece of code in developers or tutorial to help me to make the 2 sides talk. (Android (Eclipse) with Cloud SQL Server).

Can anyone help me? Another question is, Cloud SQL can only comunicate with an WebService? Can i make the comunication without WebService? Ca i do the code directly in eclipse withou webservice?






Wednesday, August 15, 2012

Re: Eclipse (Android) -> Cloud SQL Server

On Wed, Aug 15, 2012 at 2:21 PM, Marcelo <mcaorg@gmail.com> wrote:
got it...

Last question.

is this relantionship based in WebService?


Sorry, but I don't know what WebService is, nor do I understand what relationship you are referring to.
 


On Wednesday, August 15, 2012 6:13:24 PM UTC-3, Ken Ashcraft wrote:
On Wed, Aug 15, 2012 at 2:03 PM, Marcelo <mca...@gmail.com> wrote:
GAE = Google App Engine? If it is i already have this installed in my eclipse.


Yes.
 
What I need really is a "light" to start iniciate my code.


Look for tutorials on using Android and GAE.  At that point, Cloud SQL should be completely hidden behind GAE and is just an implementation detail of the GAE app.

Hope that helps,
Ken
 

On Wednesday, August 15, 2012 5:58:19 PM UTC-3, Ken Ashcraft wrote:
Your GAE app should expose an API that the android app will use.

Android -> GAE -> Cloud SQL

That way, the GAE app can enforce application-level rules about who is allowed to see what data.  Furthermore, it is far easier to make changes to the GAE app than it is to push out changes to the android app because you can't control when users upgrade the app on their phones.

Ken


On Wed, Aug 15, 2012 at 1:42 PM, Marcelo <mca...@gmail.com> wrote:
Hi,

I´m trying to make my eclipse APP Adroid talk to Cloud SQL Server. I did 4 steps below:

1-Create a Cloud SQL account - OK
2-Import the data and scheme to it  - OK
3-Create an AppEngine Application - OK
4-Allow the AppEngine app id access to the Cloud SQL- OK

BUT, here´s my problem:

5- "Create an application that android can access and talk to your cloud sql" - X

In step 5 "Create an application that android can access and talk to your cloud sql" i can´t find anything or any piece of code in developers or tutorial to help me to make the 2 sides talk. (Android (Eclipse) with Cloud SQL Server).

Can anyone help me? Another question is, Cloud SQL can only comunicate with an WebService? Can i make the comunication without WebService? Ca i do the code directly in eclipse withou webservice?






Re: Eclipse (Android) -> Cloud SQL Server

got it...

Last question.

is this relantionship based in WebService?



On Wednesday, August 15, 2012 6:13:24 PM UTC-3, Ken Ashcraft wrote:
On Wed, Aug 15, 2012 at 2:03 PM, Marcelo <mca...@gmail.com> wrote:
GAE = Google App Engine? If it is i already have this installed in my eclipse.


Yes.
 
What I need really is a "light" to start iniciate my code.


Look for tutorials on using Android and GAE.  At that point, Cloud SQL should be completely hidden behind GAE and is just an implementation detail of the GAE app.

Hope that helps,
Ken
 

On Wednesday, August 15, 2012 5:58:19 PM UTC-3, Ken Ashcraft wrote:
Your GAE app should expose an API that the android app will use.

Android -> GAE -> Cloud SQL

That way, the GAE app can enforce application-level rules about who is allowed to see what data.  Furthermore, it is far easier to make changes to the GAE app than it is to push out changes to the android app because you can't control when users upgrade the app on their phones.

Ken


On Wed, Aug 15, 2012 at 1:42 PM, Marcelo <mca...@gmail.com> wrote:
Hi,

I´m trying to make my eclipse APP Adroid talk to Cloud SQL Server. I did 4 steps below:

1-Create a Cloud SQL account - OK
2-Import the data and scheme to it  - OK
3-Create an AppEngine Application - OK
4-Allow the AppEngine app id access to the Cloud SQL- OK

BUT, here´s my problem:

5- "Create an application that android can access and talk to your cloud sql" - X

In step 5 "Create an application that android can access and talk to your cloud sql" i can´t find anything or any piece of code in developers or tutorial to help me to make the 2 sides talk. (Android (Eclipse) with Cloud SQL Server).

Can anyone help me? Another question is, Cloud SQL can only comunicate with an WebService? Can i make the comunication without WebService? Ca i do the code directly in eclipse withou webservice?





Re: Eclipse (Android) -> Cloud SQL Server

On Wed, Aug 15, 2012 at 2:03 PM, Marcelo <mcaorg@gmail.com> wrote:
GAE = Google App Engine? If it is i already have this installed in my eclipse.


Yes.
 
What I need really is a "light" to start iniciate my code.


Look for tutorials on using Android and GAE.  At that point, Cloud SQL should be completely hidden behind GAE and is just an implementation detail of the GAE app.

Hope that helps,
Ken
 

On Wednesday, August 15, 2012 5:58:19 PM UTC-3, Ken Ashcraft wrote:
Your GAE app should expose an API that the android app will use.

Android -> GAE -> Cloud SQL

That way, the GAE app can enforce application-level rules about who is allowed to see what data.  Furthermore, it is far easier to make changes to the GAE app than it is to push out changes to the android app because you can't control when users upgrade the app on their phones.

Ken


On Wed, Aug 15, 2012 at 1:42 PM, Marcelo <mca...@gmail.com> wrote:
Hi,

I´m trying to make my eclipse APP Adroid talk to Cloud SQL Server. I did 4 steps below:

1-Create a Cloud SQL account - OK
2-Import the data and scheme to it  - OK
3-Create an AppEngine Application - OK
4-Allow the AppEngine app id access to the Cloud SQL- OK

BUT, here´s my problem:

5- "Create an application that android can access and talk to your cloud sql" - X

In step 5 "Create an application that android can access and talk to your cloud sql" i can´t find anything or any piece of code in developers or tutorial to help me to make the 2 sides talk. (Android (Eclipse) with Cloud SQL Server).

Can anyone help me? Another question is, Cloud SQL can only comunicate with an WebService? Can i make the comunication without WebService? Ca i do the code directly in eclipse withou webservice?





Re: Eclipse (Android) -> Cloud SQL Server

GAE = Google App Engine? If it is i already have this installed in my eclipse.

What I need really is a "light" to start iniciate my code.

On Wednesday, August 15, 2012 5:58:19 PM UTC-3, Ken Ashcraft wrote:
Your GAE app should expose an API that the android app will use.

Android -> GAE -> Cloud SQL

That way, the GAE app can enforce application-level rules about who is allowed to see what data.  Furthermore, it is far easier to make changes to the GAE app than it is to push out changes to the android app because you can't control when users upgrade the app on their phones.

Ken

On Wed, Aug 15, 2012 at 1:42 PM, Marcelo <mca...@gmail.com> wrote:
Hi,

I´m trying to make my eclipse APP Adroid talk to Cloud SQL Server. I did 4 steps below:

1-Create a Cloud SQL account - OK
2-Import the data and scheme to it  - OK
3-Create an AppEngine Application - OK
4-Allow the AppEngine app id access to the Cloud SQL- OK

BUT, here´s my problem:

5- "Create an application that android can access and talk to your cloud sql" - X

In step 5 "Create an application that android can access and talk to your cloud sql" i can´t find anything or any piece of code in developers or tutorial to help me to make the 2 sides talk. (Android (Eclipse) with Cloud SQL Server).

Can anyone help me? Another question is, Cloud SQL can only comunicate with an WebService? Can i make the comunication without WebService? Ca i do the code directly in eclipse withou webservice?




Re: Eclipse (Android) -> Cloud SQL Server

Your GAE app should expose an API that the android app will use.

Android -> GAE -> Cloud SQL

That way, the GAE app can enforce application-level rules about who is allowed to see what data.  Furthermore, it is far easier to make changes to the GAE app than it is to push out changes to the android app because you can't control when users upgrade the app on their phones.

Ken

On Wed, Aug 15, 2012 at 1:42 PM, Marcelo <mcaorg@gmail.com> wrote:
Hi,

I´m trying to make my eclipse APP Adroid talk to Cloud SQL Server. I did 4 steps below:

1-Create a Cloud SQL account - OK
2-Import the data and scheme to it  - OK
3-Create an AppEngine Application - OK
4-Allow the AppEngine app id access to the Cloud SQL- OK

BUT, here´s my problem:

5- "Create an application that android can access and talk to your cloud sql" - X

In step 5 "Create an application that android can access and talk to your cloud sql" i can´t find anything or any piece of code in developers or tutorial to help me to make the 2 sides talk. (Android (Eclipse) with Cloud SQL Server).

Can anyone help me? Another question is, Cloud SQL can only comunicate with an WebService? Can i make the comunication without WebService? Ca i do the code directly in eclipse withou webservice?




Eclipse (Android) -> Cloud SQL Server

Hi,

I´m trying to make my eclipse APP Adroid talk to Cloud SQL Server. I did 4 steps below:

1-Create a Cloud SQL account - OK
2-Import the data and scheme to it  - OK
3-Create an AppEngine Application - OK
4-Allow the AppEngine app id access to the Cloud SQL- OK

BUT, here´s my problem:

5- "Create an application that android can access and talk to your cloud sql" - X

In step 5 "Create an application that android can access and talk to your cloud sql" i can´t find anything or any piece of code in developers or tutorial to help me to make the 2 sides talk. (Android (Eclipse) with Cloud SQL Server).

Can anyone help me? Another question is, Cloud SQL can only comunicate with an WebService? Can i make the comunication without WebService? Ca i do the code directly in eclipse withou webservice?



Re: An Implementation of RSA Algorithm using Cloud SQL

The author doesn't have a good understand of security. The wording is pretty strange too. It would be good not to advertise this too broadly. :P

From page 3575:

  Step 9: Write Java code to implement RSA algorithm in
  cloud and debug the application in google cloud.

From page 3578:

  Step 5: By clicking the "supplier store" button the entered
  details received by "supplier store" class and
  private and public key generated using RSA
  algorithm

  ...

  Step 7: During retrieval of data, it is decrypted after
  checking the generated private key with existing
  private key

-- Razvan ME


On Wed, Aug 15, 2012 at 8:54 AM, Joe Faith <joefaith@google.com> wrote:
N. Saravanan et al have published a demonstration of encrypting data in Google Cloud SQL using RSA.

Joe

An Implementation of RSA Algorithm using Cloud SQL

N. Saravanan et al have published a demonstration of encrypting data in Google Cloud SQL using RSA.

Joe

Tuesday, August 14, 2012

Re: Failed to import from Cloud Storage as of June 6th

I separated the structure import from the data import and made it work. I´d try that!

Den måndagen den 11:e juni 2012 kl. 06:28:58 UTC+2 skrev Abhishek Mathur:
Did you checked for foreign key dependencies, that might be preventing your table from getting dropped.
 Does your dump file contains options to disable foreign key checks?



On Fri, Jun 8, 2012 at 1:23 PM, Wilco Tomassen <wi...@cleverfranke.com> wrote:
Hi Razvan and Tony,

Thank you for your reply, the dump file does include a database selection command (USE `google_ccb`;)

Wilco




On Thu, Jun 7, 2012 at 5:31 PM, Razvan Musaloiu-E. <raz...@google.com> wrote:
The import fails with the following error:

Could not execute statement: DROP TABLE IF EXISTS `abs_metric_cache`

Does your dump properly selects the database (USE ...)?

-- Razvan ME

On Thu, Jun 7, 2012 at 7:25 AM, Wilco Tomassen <wi...@cleverfranke.com> wrote:
Hi,

The instance is consumerbarometer:ccb 


On Thu, Jun 7, 2012 at 4:09 PM, Tony Tseng <t...@google.com> wrote:
Hi,
What is the name of your cloud sql instance?

On Thu, Jun 7, 2012 at 3:27 AM, wilco <cfwilco...@gmail.com> wrote:

As of yesterday (June 6th 2012), the process of synchronizing my development database ( MySQL 5.1 on Debian Squeeze) to Google Cloud SQL (MySQL 5.5) permanently results in the error Failed to import gs://effectivemysql/dump1.sql: An unknown problem occurred (ERROR_RDBMS), while this has worked flawlessly for the last 2 months.

The shell script I use to create and transfer the dump to Google Cloud Storage:

clear
echo "Creating dump of database"
echo "MySQL root password required"
mysqldump -v -u root -p --databases my_database > /root/my_database.sql
echo "Database dump done, gzipping output"
gzip -1 /root/my_database.sql
echo "GZipping done, starting transfer to Cloud Storage"
gsutil cp /root/my_database.sql.gz gs://my_bucket/
echo "Transfer done, removing dump file"
rm /root/my_database.sql.gz
echo "Done"

I've tried separate tables, no gzipping, other mysqldump options (complete inserts, skip-comments etc), to no avail. The generated dump files have also been imported to other database without problems, just Cloud SQL seems to have this problem.





--
Met vriendelijke groet,

Wilco Tomassen




--
Met vriendelijke groet,

Wilco Tomassen

Sunday, August 12, 2012

Re: Can't create new instance

thank you very much, issue is fixed.

On Saturday, August 11, 2012 4:06:43 PM UTC-7, Tony Tseng wrote:
Should be fixed now. Please try again.

On Sat, Aug 11, 2012 at 3:51 PM, ToddF <ad...@toddfernandezinc.com> wrote:
Hi Tony,

I am having a similar problem.  Billing is enabled, but it will not allow me to create new instances with a 'billing is disabled' message.  My project ID number is 1069739431484.  Is this something I can fix from my end in the future?  The project is new, I didn't see any documentation about waiting X hrs after getting the enabled billing message.

Sorry for the reply/hijack, but there are so many similar topics I figured this would get more notice and not flood the more whinging


On Tuesday, July 31, 2012 4:53:41 PM UTC-7, Tony Tseng wrote:
You should be able to create new instances now.



Saturday, August 11, 2012

Re: Can't create new instance

Should be fixed now. Please try again.

On Sat, Aug 11, 2012 at 3:51 PM, ToddF <admin@toddfernandezinc.com> wrote:
Hi Tony,

I am having a similar problem.  Billing is enabled, but it will not allow me to create new instances with a 'billing is disabled' message.  My project ID number is 1069739431484.  Is this something I can fix from my end in the future?  The project is new, I didn't see any documentation about waiting X hrs after getting the enabled billing message.

Sorry for the reply/hijack, but there are so many similar topics I figured this would get more notice and not flood the more whinging


On Tuesday, July 31, 2012 4:53:41 PM UTC-7, Tony Tseng wrote:
You should be able to create new instances now.



Re: Can't create new instance

Hi Tony,

I am having a similar problem.  Billing is enabled, but it will not allow me to create new instances with a 'billing is disabled' message.  My project ID number is 1069739431484.  Is this something I can fix from my end in the future?  The project is new, I didn't see any documentation about waiting X hrs after getting the enabled billing message.

Sorry for the reply/hijack, but there are so many similar topics I figured this would get more notice and not flood the more whinging

On Tuesday, July 31, 2012 4:53:41 PM UTC-7, Tony Tseng wrote:
You should be able to create new instances now.


Re: 10 gigabyte limitation - will this be changed in the near future

Hi Ken, thanks for the reply.

We are moving to making extensive use of the blob service - that's what I was working on yesterday actually. So far, it looks like it will help us a good deal, as most of our storage is large objects as opposed to millions of rows.

Sharding is also be an option, but we would prefer to avoid that if possible.

We are not at 10G yet, and may not be for some time, but it is definitely concerning. For my peace of mind, I'd love to see that limit lifted.

-John

On Friday, August 10, 2012 5:41:03 PM UTC-4, Ken Ashcraft wrote:
On Fri, Aug 10, 2012 at 11:50 AM, John Kelvie <jo...@dwinq.com> wrote:
We are changing our data architecture, and with our new one, the 10 GB limitation could be a problem. What can we do about this?

It is a limit that we would like to raise in the future, but we have nothing to announce at this time.  Do you have any blobs that you can store in Cloud Storage instead?  Can you shard your data?

Ken

Friday, August 10, 2012

Re: 10 gigabyte limitation - will this be changed in the near future

On Fri, Aug 10, 2012 at 11:50 AM, John Kelvie <john@dwinq.com> wrote:
We are changing our data architecture, and with our new one, the 10 GB limitation could be a problem. What can we do about this?

It is a limit that we would like to raise in the future, but we have nothing to announce at this time.  Do you have any blobs that you can store in Cloud Storage instead?  Can you shard your data?

Ken

10 gigabyte limitation - will this be changed in the near future

We are changing our data architecture, and with our new one, the 10 GB limitation could be a problem. What can we do about this?

Thursday, August 9, 2012

Re: about deferrable constraint in Google cloud SQL

We focus on ACID transaction ,In particular the data should be consistent at the end of transaction ,but the integrity rules could be temporarily broken during the transaction.
So MySQL cannot break the integrity rules during the transaction right? 


เมื่อ วันพฤหัสบดีที่ 9 สิงหาคม ค.ศ. 2012, 8 นาฬิกา 58 นาที 08 วินาที UTC+7, Razvan Musaloiu-E. เขียนว่า:
I'm not familiar with DB2. In MySQL you can disable the foreign key constraints [1] but you cannot bypass the normal constraints.

[1] http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_foreign_key_checks 

-- Razvan ME


On Wed, Aug 8, 2012 at 6:44 PM, Rast Rastapana <tung_...@hotmail.com> wrote:
Due to some task needed to bypass some value in the beginning (NULL value can't insert into DB because of the integrity constraint) ,
Can i defer integrity constrain on my work like DB2 in each transaction or have another way to defer validation /checking at first but it works  ?
(Like "DEFERRABLE"  declaration on Google Cloud SQL )

Best regards.




Wednesday, August 8, 2012

Re: about deferrable constraint in Google cloud SQL

I'm not familiar with DB2. In MySQL you can disable the foreign key constraints [1] but you cannot bypass the normal constraints.

[1] http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_foreign_key_checks

-- Razvan ME


On Wed, Aug 8, 2012 at 6:44 PM, Rast Rastapana <tung_suplex@hotmail.com> wrote:
Due to some task needed to bypass some value in the beginning (NULL value can't insert into DB because of the integrity constraint) ,
Can i defer integrity constrain on my work like DB2 in each transaction or have another way to defer validation /checking at first but it works  ?
(Like "DEFERRABLE"  declaration on Google Cloud SQL )

Best regards.




about deferrable constraint in Google cloud SQL

Due to some task needed to bypass some value in the beginning (NULL value can't insert into DB because of the integrity constraint) ,
Can i defer integrity constrain on my work like DB2 in each transaction or have another way to defer validation /checking at first but it works  ?
(Like "DEFERRABLE"  declaration on Google Cloud SQL )

Best regards.



Re: What is "Content" in Google ToS?

On Wed, Aug 8, 2012 at 7:16 AM, steve <sharris@rationalblue.com> wrote:
Google's Terms of Service include reference to providing a "worldwide license to use, host, store, reproduce, modify, create derivative works" from uploaded "content." 


I can't find the phrase that you quoted in the ToS.  Are you sure you're looking at the right one?

Ken

Re: Dump to export from GCSQL to client?

You can export the entire database. The instructions are here:


-- Razvan ME


On Wed, Aug 8, 2012 at 7:15 AM, steve <sharris@rationalblue.com> wrote:
I have just begun evaluating use of Google cloud and the MySql feature for a couple of different clients.

When using MySql with a typical web-based interface, it is usually feasible to "dump" a table out to the client as a way for the client to retrieve bulk data from the server.  The data may be dumped out as a standard SQL "dump" file, or in other formats (e.g., Excel).  I noted in documentation that there are certain restrictions on SQL. 

Does Google Cloud SQL offer dump capability to export data from the online database to a client?



What is "Content" in Google ToS?

Google's Terms of Service include reference to providing a "worldwide license to use, host, store, reproduce, modify, create derivative works" from uploaded "content." 

Question is what is "content?"  That is, does the data that I upload to a Google Cloud MySql database constitute "content" within the meaning of that term in Google's Terms of Service?

Dump to export from GCSQL to client?

I have just begun evaluating use of Google cloud and the MySql feature for a couple of different clients.

When using MySql with a typical web-based interface, it is usually feasible to "dump" a table out to the client as a way for the client to retrieve bulk data from the server.  The data may be dumped out as a standard SQL "dump" file, or in other formats (e.g., Excel).  I noted in documentation that there are certain restrictions on SQL. 

Does Google Cloud SQL offer dump capability to export data from the online database to a client?


Monday, August 6, 2012

Re: Wordpress + AppEngine = PressEngine

Hi Trung,

What happened with pressengine?

I've been trying to see it but shows a 500 error with 

Error establishing a database connection


Hope you could share more about it

Cheers

On Friday, March 23, 2012 2:05:22 PM UTC-6, Trung wrote:
Hi friends,

Just inform you that we are setting up WordPress running on AppEngine
using Cloud SQL database.

See http://pressengine.appspot.com/

Hope this help.

Saturday, August 4, 2012

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

Hello Everyone,

I am new programmer to Python world coming form Java background. Even before starting application development I am stuck with just configuring Django-GAE.

I am using Mac OS X Lion and it has been updated to python 2.7. Secondly I am using PyCharm which make my work easy for configuring Django with GAE. But I am stuck with this stupid error for such a long time that I dont know how to recover from it. Please see the stack trace--

<class 'django.core.exceptions.ImproperlyConfigured'>: Error loading MySQLdb module: No module named MySQLdb 
      args = ('Error loading MySQLdb module: No module named MySQLdb',) 
      message = 'Error loading MySQLdb module: No module named MySQLdb'

________________________ ALSO THIS STACK FROM PyCharm _________________________

Warning: You are using a Python runtime (2.7) that is more recent than the production runtime environment (2.5). Your application may use features that are not available in the production environment and may not work correctly when deployed to production.
INFO     2012-08-04 07:23:49,855 appengine_rpc.py:159] Server: appengine.google.com
INFO     2012-08-04 07:23:49,860 appcfg.py:463] Checking for updates to the SDK.
WARNING  2012-08-04 07:23:50,149 datastore_file_stub.py:512] Could not read datastore data from /var/folders/f1/4tms73816nv959jqkh9wjnqh0000gn/T/dev_appserver.datastore
INFO     2012-08-04 07:23:50,151 rdbms_sqlite.py:58] Connecting to SQLite database '' with file '/var/folders/f1/4tms73816nv959jqkh9wjnqh0000gn/T/dev_appserver.rdbms'
WARNING  2012-08-04 07:23:50,274 dev_appserver.py:4648] Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named _imaging
INFO     2012-08-04 07:23:50,290 dev_appserver_multiprocess.py:637] Running application anuj-acharya on port 8080: http://localhost:8080
WARNING  2012-08-04 07:23:56,812 py_zipimport.py:139] Can't open zipfile /Library/Python/2.7/site-packages/oauth2-1.5.170-py2.7.egg: IOError: [Errno 13] file not accessible: '/Library/Python/2.7/site-packages/oauth2-1.5.170-py2.7.egg'
WARNING  2012-08-04 07:23:56,813 py_zipimport.py:139] Can't open zipfile /Library/Python/2.7/site-packages/prettytable-0.5-py2.7.egg: IOError: [Errno 13] file not accessible: '/Library/Python/2.7/site-packages/prettytable-0.5-py2.7.egg'
WARNING  2012-08-04 07:23:56,813 py_zipimport.py:139] Can't open zipfile /Library/Python/2.7/site-packages/cluster-1.1.1b3-py2.7.egg: IOError: [Errno 13] file not accessible: '/Library/Python/2.7/site-packages/cluster-1.1.1b3-py2.7.egg'
WARNING  2012-08-04 07:23:56,814 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'
ERROR    2012-08-04 07:23:57,357 dev_appserver.py:4096] Exception encountered handling request
Traceback (most recent call last):
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 4039, in _HandleRequest
    self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 3945, in _Dispatch
    base_env_dict=env_dict)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 605, in Dispatch
    base_env_dict=base_env_dict)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 3015, in Dispatch
    self._module_dict)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 2925, in ExecuteCGI
    reset_modules = exec_script(handler_path, cgi_path, hook)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 2785, in ExecuteOrImportScript
    exec module_code in script_module.__dict__
  File "/Users/anujacharya1/PycharmProjects/anujsite/main.py", line 16, in <module>
    import django.db
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1426, in Decorate
    return func(self, *args, **kwargs)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 2401, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1426, in Decorate
    return func(self, *args, **kwargs)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 2273, in FindAndLoadModule
    description)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1426, in Decorate
    return func(self, *args, **kwargs)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 2216, in LoadModuleRestricted
    description)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django_1_2/django/db/__init__.py", line 77, in <module>
    connection = connections[DEFAULT_DB_ALIAS]
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django_1_2/django/db/utils.py", line 92, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django_1_2/django/db/utils.py", line 33, in load_backend
    return import_module('.base', backend_name)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django_1_2/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1426, in Decorate
    return func(self, *args, **kwargs)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 2401, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1426, in Decorate
    return func(self, *args, **kwargs)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 2273, in FindAndLoadModule
    description)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1426, in Decorate
    return func(self, *args, **kwargs)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 2216, in LoadModuleRestricted
    description)
  File "/Users/anujacharya1/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django_1_2/django/db/backends/mysql/base.py", line 14, in <module>
    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb
INFO     2012-08-04 07:23:57,361 dev_appserver.py:4143] "GET / HTTP/1.1" 500 -
ERROR    2012-08-04 07:23:58,035 dev_appserver.py:3253] Error encountered reading file "/Users/anujacharya1/PycharmProjects/anujsite/favicon.ico":
[Errno 2] No such file or directory: '/Users/anujacharya1/PycharmProjects/anujsite/favicon.ico'
INFO     2012-08-04 07:23:58,045 dev_appserver.py:4143] "GET /favicon.ico HTTP/1.1" 404 -








On Wednesday, November 30, 2011 1:15:36 PM UTC-8, Philip wrote:
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?

Friday, August 3, 2012

Re: Exception while trying to call Stored Procedure in Google Cloud: java.sql.SQLException: 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 '{ call ... }' at line 1

Try removing the space between { and call and see if that works.

Rob

On Thu, Aug 2, 2012 at 12:40 PM, Luis Esteban Acosta Zuñiga <luis.acostaz@gmail.com> wrote:
Hi everyone.
I have a GAE application where I call to stored procedures, it has started throwing this exception the last week:
java.sql.SQLException: 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 '{ call ... }' at line 1

It was weird because I have a local development enviroment with mysql and App Engine where this application was still running fine.
After several days, I found that the exception is caused by the String I use to call the stored procedure in java.
This String works in local enviroment with mysql and App Engine and is the usual way to call a stored procedure in every java tutorial I've seen:

...
Connection c = null;
CallableStatement spStmt = null;
ResultSet rs = null;

c = DriverManager.getConnection("jdbc:google:rdbms://instance/bd");
spStmt = c.prepareCall("{ call StoredProcName(?) }");
spStmt.execute();
rs = spStmt.getResultSet();
...

But from some day ago it will return this exception when deployed in GAE:

java.sql.SQLException: 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 ' { call StoredProcName(?) } ' at line 1 

The new way to call a stored procedure, that works both in local and GAE environment is removing the opening and closing braces { } :

...
spStmt = c.prepareCall("call StoredProcName(?)");
...

Now my app is working fine(again), something to consider in the future.
Regards.