libreoffice-mysql-connector cannot create/edit tables over SSH tunnel from the internet

Bug #1342755 reported by Yuv
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libreoffice (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Testing with Xubuntu 14.04 and with LibreOffice version 1:4.3.0~rc2-1ubuntu1~trusty0 from the pre-releases PPA.

Server Side:
------------
> CREATE DATABASE test;
> GRANT ALL PRIVILEGES ON test.* to 'dbuser'@'localhost' IDENTIFIED BY 'password';
> FLUSH PRIVILEGES;

dbuser performs all operations on databse test as expected.

Client Side:
------------
SSH tunnel established with:
$ ssh -L5000:server.example.com:3306 <email address hidden>

Manual connection test works well:
$ mysql -h 127.0.0.1 --port=5000 -u dbuser - p

dbuser performs all operations on databse test as expected.

Install and restart libreoffice:
$ sudo apt-get install libreoffice-mysql-connector

In LibreOffice, when I try to create a table, it reports the following error:
  SQL Status: 42000
  Error code: 1142
  CREATE command denied to user 'dbuser'@'localhost' for table 'Capacity'

A quick search for the error codes indicates that I am logged into mysql with a default null user with just about zero privileges.

I can read table content, but I cannot edit them in any meaningful way.

Workaround (JDBC):
------------------

Install and restart libreoffice:
$ sudo apt-get install libmysql-java

Configure:
* Tools -> Options -> LibreOffice -> Advanced
* tick Use a jre
** Select Oracle 1.7.0_55
* Click Class Path
** Add Archive /usr/share/java/mysql-connector-java.jar
* Restart LO (or maybe reboot, at first it did not work)

Now LibreOffice Base can edit a MySQL database over an SSH tunnel.

I hope my report is in the right place
https://lists.launchpad.net/libreoffice/msg00072.html

Tags: ppa
Revision history for this message
Yuv (yuv) wrote :

More research into this:
* I can create tables from LibreOffice to MySQL, but they must have primary keys
* Once tables have primary keys, they can be edited
* Table created MySQL-side, that works:
> CREATE TABLE idxtest (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10));
* Table that did not work, making it work:
> ALTER TABLE test ADD d INT UNSIGNED NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (d);

Is there a reason for LibreOffice Base not to allow writing into non-indexed tables?

set it to invalid here since it does not look like a packaging issue. sorry for the extra report.

Changed in libreoffice (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.