Connect to Google Cloud SQL using LibreOffice

452 views
Skip to first unread message

Gheorghe Chirica

unread,
Feb 12, 2013, 10:29:00 AM2/12/13
to google-cloud...@googlegroups.com
Hi!

Just curios if someone tried to connect to GCSql using LibreOffice. Currently LibreOffice allow to connect to different databases (including MySql).

In attachments I added few screenshots on how I try it.




Screenshot from 2013-02-12 17:23:54.png
Screenshot from 2013-02-12 17:26:44.png

Ken Ashcraft

unread,
Feb 12, 2013, 10:42:03 AM2/12/13
to google-cloud...@googlegroups.com
Looks like the setup is pretty similar to this:




--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gheorghe Chirica

unread,
Feb 13, 2013, 2:31:48 AM2/13/13
to google-cloud...@googlegroups.com
Yes, saw this tutorial earlier and thought it should work/configured in similar way, but seems that not. Can't figure out how to do it.

Maybe there is someone there which did it. 

Ken Ashcraft

unread,
Feb 13, 2013, 5:55:59 AM2/13/13
to google-cloud...@googlegroups.com
On Wed, Feb 13, 2013 at 7:31 AM, Gheorghe Chirica <chirica...@gmail.com> wrote:
Yes, saw this tutorial earlier and thought it should work/configured in similar way, but seems that not. Can't figure out how to do it.


From your screenshot, it appears that you are using the standard mysql driver instead of the Google driver.

Gheorghe Chirica

unread,
Feb 13, 2013, 7:04:40 AM2/13/13
to google-cloud...@googlegroups.com
Ok, I tried it on a differnt computer and it worked, I got "The JDBC driver was loaded successfully". Probably different java version.
 
But now I have another problem. When I'm on step 3 "Set up user authentication", I press test connection and I get

SQL Status: 22023

Unable to load OAuth2 refresh or access token. Please run the google_sql command line tool once to setup cached credentials. See: http://code.google.com/apis/sql/docs/commandline.html


I did steps described here http://code.google.com/apis/sql/docs/commandline.html and in attachment you can see that I'm connected to MySql DB from command line.

Not sure what's the problem, it should connect.

googlecloudsql.png
Unable_to_load_OAuth2.png

Razvan Musaloiu-E.

unread,
Feb 13, 2013, 10:58:28 AM2/13/13
to google-cloud...@googlegroups.com
Can you get the ./google_sql.sh to work as your user? I would expect the sudo to put the keys in the root directory instead of yours.

-- Razvan ME

Gheorghe Chirica

unread,
Feb 14, 2013, 11:29:47 AM2/14/13
to google-cloud...@googlegroups.com
Yes, you are right. I tried it without sudo and was able to connect. Thx!

I connected to Google Cloud Sql using LibreOffice database tool. Created a table.

Now I want to edit/add data using LO spreadsheet.

So, here are the steps
1. open a spreadsheet
2. Press F4
3. There you can see an already existing database called "Bibliography", expand till table "biblio". You can see content data on the right.
4. Drag and drop biblio table on spreadsheet, It works!

Now when I try to do it the same way using Google Cloud Sql DB I create earlier I get the following errors:

The data content could not be updated

SQL Status: 0A100

CONCUR_UPDATABLE is not implemented yet.

The SQL command leading to this error is:

SELECT * FROM `test`.`users_info` 


Check attachments for more details.

Thx for your help!
error1.png
error2.png

Rob Clevenger

unread,
Feb 14, 2013, 12:56:38 PM2/14/13
to google-cloud...@googlegroups.com
Looks like libreoffice is choosing to open all resultsets with CONCUR_UPDATABLE mode (when isn't implemented in the cloud sql driver). The MySQL driver implemented a workaround for this in http://bugs.mysql.com/bug.php?id=35415.  Unfortunately we don't have a similar hack to our driver to work around this.

Thanks,

Rob

Gheorghe Chirica

unread,
Feb 14, 2013, 3:38:44 PM2/14/13
to google-cloud...@googlegroups.com
So, for now their is no way do to so with OpenOffice ?

But why using this https://developers.google.com/cloud-sql/docs/admin_tools it's possible to connect ? 


This tool is using the same google driver. 

Razvan Musaloiu-E.

unread,
Feb 14, 2013, 3:52:56 PM2/14/13
to google-cloud...@googlegroups.com
If there is no way to make OpenOffice not use the CONCUR_UPDATABLE then yes, the operations that require that will not work from OpenOffice. The SQuirrel SQL Client works because it doesn't use that.

-- Razvan ME
Reply all
Reply to author
Forward
0 new messages