1. Set up a MySQL server 2. Install libreoffice-mysql-connector on a client in the same LAN (not on the server) 3. Tunnel a local port over SSH to your MySQL server 3. Open Base, choose to connect to a database of type MySQL 4. Decide to connect directly (not through JDBC or ODBC) 5. Enter localhost and the port you tunneled over SSH Expected behavior: The connection works Real behavior: An error message pops up citing problems with a file /var/run/mysqld/mysqld.sock See also https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1276442 If you need more details, please ask for them. I'm on Debian 7
I managed to connect from the LAN by installing (on Debian stable) libreoffice from backports (and hence libreoffice-mysql-connector from backports too). Still I can't connect from the internet with the very same settings. I can SSH into my server and the tunnel works too, so it has to be a LO problem.
I changed the subject to reflect the fact it does work on the same LAN by installing the version 1.0.2+LibO4.1.4-2~bpo70+1 (requires Libreoffice from backports) but not from the internet. I admit my previous comment may have been a bit misleading. What I meant with "very same settings" was referred to the configuration in LO Base, of course not to the establishment of a remote tunnel vs a local one. For the sake of clarity I repeat that I can SSH remotely from outside the LAN and the tunnel test correctly in this setting, just LO Base can't use it. I've been asked to point out that exist a version of this extension for AOO http://extensions.openoffice.org/en/project/mysql-connector-openofficeorg or http://extensions.openoffice.org/en/node/5644 that, according to comment #6 by jph on https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1276442 should already be fixed. But these extensions can't be installed on Debian stable. For completeness, here's the bug report I filed on Debian BTS: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745101
Where did you get the direct connection to MySQL from? Please don't use a connector written for OpenOffice or AOO for any LO-Version 4.1 or later. Values in timefields and timestamp-fields would be shown wrong in LO 4.1 and later. There is a difference between the code of AOO and LO since this version. LO 4.1 would only get one more bugfix-release. So I don't know any working direct connection to MySQL.
I installed libreoffice-mysql-connector from Debian 7 repositories. I did not test with any extension intended for AOO. I'm not understanding your last statement, can you clarify?
(In reply to comment #4) > I installed libreoffice-mysql-connector from Debian 7 repositories. > I did not test with any extension intended for AOO. I'm not understanding > your last statement, can you clarify? There isn't any libreoffice-mysql-connector, supported by LO, available for LO 4.1 and all other versions where bugfixes would be made in the future. The connector is an extension. When you have installed the connector from Debian 7 the only possibility to get a fix of the connector is to write a bugreport for Debian, not for LibreOffice. Whats the version of LO you are using?
that is nonsense. Yes, you as LO mkight not ship it on some site but there IS a mysql-connector in the tree. still. http://cgit.freedesktop.org/libreoffice/core/tree/configure.ac#n799 (which is what we are talking about, it still creates mysql-connector as the extension name) http://cgit.freedesktop.org/libreoffice/core/tree/mysqlc so it *is* your bug. (And yes, he filed this in Debian, too.)
if it's really completely unsupported it should be gone (it's in 4.2 tree and maste), currently I am contining shipping it: https://packages.debian.org/search?keywords=libreoffice-mysql-connector And note he already said in this comments which versions he used. a) "For completeness, here's the bug report I filed on Debian BTS: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745101" That one already says 3.5.4. "installed libreoffice-mysql-connector from Debian 7 repositories." Debian 7 is wheezy, see the above URL: 3.5.4. b) 4.1.4 (see https://bugs.freedesktop.org/show_bug.cgi?id=77584#c2)
(In reply to comment #6) > that is nonsense. Yes, you as LO mkight not ship it on some site but there IS > a mysql-connector in the tree. still. I am only a user of LO. I don't know anything about the source-code of LO and are not able to fix any bug. > > http://cgit.freedesktop.org/libreoffice/core/tree/configure.ac#n799 > (which is what we are talking about, it still creates mysql-connector as > the extension name) > http://cgit.freedesktop.org/libreoffice/core/tree/mysqlc Could be that there is anything in the source code. But I, as a "only user" of LO, couldn't get the mysql-connector for LO 4.1 or newer - I don't know where I should get the extension. I don't search every link of a bug-report to see which version the reporter is using. I read the reports, don't find anything there and don't find the version chosen in this bug-report. So I asked for the version. I couldn't solve the problem here. So this would be my last comment for this.
Noel: seeing this commit, I thought you might be interested to be in cc of this tracker. Would it be possible you cherry-pick this for 4.3 and 4.2 branch? (Meanwhile put it at NEW since it's been confirmed)
oups, forgot to indicate the commit: http://cgit.freedesktop.org/libreoffice/core/commit/?id=6b50e21473e7d2b24b5c609d8a1c31f27644d842
can confirm the fix makes it work in 4.2.x
Following Rene's comment, I cherry-picked for review the Noel's fix: 4.3: https://gerrit.libreoffice.org/9642 4.2: https://gerrit.libreoffice.org/9643 (Noel: if there's any problem with these, just tell me and I abandon them. I thought this patch was really helpful and straightforward)
The patch has been pushed in both branches. So let's put this as FIXED. If, after 48 hours , you can reproduce the problem with a 4.2 or 4.3 daily build, don't hesitate to reopen this tracker.
Hi Julien, thank you so much for pushing the patch to both branches. I have to report half success. Testing with Xubuntu 14.04 and with LibreOffice from PPA: * Version 1:4.2.5~rc2-0ubuntu2 from the PPA still can't connect * Version 1:4.3.0~rc2-1ubuntu1~trusty0 from the pre-releases PPA connects fine. SSH tunnel established with: ssh -L5000:server.example.com:3306 user@server.example.com Manual connection test works well: mysql -h 127.0.0.1 --port=5000 -u dbuser - p LibreOffice 4.2 branch of the PPA fails: SQL Status: HY000 Error code: 2002 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) LibreOffice 4.3 branch connects well, but is it safe for production? Is there a way to run both version concurrently? or to fix the 4.2 branch in the PPA?
I am afraid things are not working as expected with 4.3 either. When I try to create a table, LibreOffice reports the following error: SQL Status: 42000 Error code: 1142 CREATE command denied to user 'dbuser'@'localhost' for table 'Capacity' The MySQL database was created server side as an empty database and the user was granted all privileges on it: CREATE DATABASE test; GRANT ALL PRIVILEGES ON test.* to 'dbuser'@'localhost' IDENTIFIED BY 'password'; A quick search for the error codes indicates that I am logged into mysql with a default null user with just about zero privileges.
More details: when I create a table server side with CREATE TABLE test (a VARCHAR(255), b INT(9)); it is not immediately visible / updated client side in LibreOffice. when I close and reopen the database, the newly created table shows. LibreOffice can edit the table in design field, e.g. add a field c VARCHAR(100), but not edit or add data. server-side everything work as expected with the same user credentials.
Y: PPA is not in scope of this - ask your Ubuntu packager. The patch is only in 4.2.6 officially, Debians packages have the patch backported. If your Ubuntu package doesn't have the patch - obviously it cannot work. Your other problems might indicate an other bug - should be handled in an other bug, too.
Thanks, Rene. Done * Packager: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1342755 * LibreOffice: https://bugs.freedesktop.org/show_bug.cgi?id=81430