Re: [libreoffice-users] Failed connection to MySQL database
Hi Harvey, I connect daily to a MySQL database located on a network server from the LO-Base front-end on my desktop. The connection type is MySQL(JDBC). However, today, the "driver class 'com.mysql.jdbc.Driver' could not be loaded". There seems to be no way to make the connection, although I am not aware of having changed anything. I can access the database via my browser using phpMyAdmin, so, I assume, there is nothing wrong with the database schemata themselves. You are using JDBC with MySQL. Don't know how you have set the connection, but if there has been a update of your system the driver class might be wrong. Could be it has changed to com.mysql.cj.jdbc.Driver. Which version of MySQL is version on your system? Did you include the driver manually by LibreOffice in ClassPath (Options → LibreOffice → Extended…)? Regards Robert -- Homepage: https://www.familiegrosskopf.de/robert -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
Re: [libreoffice-users] Failed connection to MySQL database
On Tue, 2023-05-23 at 15:05 +0200, Robert Großkopf wrote: > Hi Harvey, > > > > I connect daily to a MySQL database located on a network server > > from > > the LO-Base front-end on my desktop. The connection type is > > MySQL(JDBC). However, today, the "driver class > > 'com.mysql.jdbc.Driver' > > could not be loaded". There seems to be no way to make the > > connection, > > although I am not aware of having changed anything. I can access > > the > > database via my browser using phpMyAdmin, so, I assume, there is > > nothing wrong with the database schemata themselves. > > You are using JDBC with MySQL. Don't know how you have set the > connection, but if there has been a update of your system the driver > class might be wrong. Could be it has changed to > com.mysql.cj.jdbc.Driver. > > Which version of MySQL is version on your system? > Did you include the driver manually by LibreOffice in ClassPath > (Options > → LibreOffice → Extended…)? > > Regards > > Robert > -- > Homepage: https://www.familiegrosskopf.de/robert > > Thanks for your input, robert. I am running mariadb 10 on the backend. File mysql-connector-java.jar is registered under Options -> LibreOffice -> Advanced -> Class Path at /usr/share/java/ I'm not sure I follow what you saying about connection change. I haven't changed the connection parameters nor the method. I have tried setting up the database with an alternative connection method (i.e 'Direct'). That succeeds, but I need to transfer all my macros, queries, forms and reports from the old .odb to the new one. Cheers Harvey -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
Re: [libreoffice-users] Failed connection to MySQL database
Hi Harvey, I am running mariadb 10 on the backend. File mysql-connector-java.jar is registered under Options -> LibreOffice -> Advanced -> Class Path at /usr/share/java/ For MariaDB I would use the JDBC-connector fro MariaDB, not from MySQL. You could get the connector form here: https://downloads.mariadb.com/Connectors/java/ Connection to: org.mariadb.jdbc.Driver For connecting with drivers since version 3.0. you have to add ?permitMysqlScheme to the database name test?permitMysqlScheme will be the connection string for the database 'test'. I'm not sure I follow what you saying about connection change. I haven't changed the connection parameters nor the method. I have tried setting up the database with an alternative connection method (i.e 'Direct'). That succeeds, but I need to transfer all my macros, queries, forms and reports from the old .odb to the new one. Couldn't you change the connection in the file, which had been connected by JDBC? Regards Robert -- Homepage: https://www.familiegrosskopf.de/robert -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
Re: [libreoffice-users] Failed connection to MySQL database
Hi Robert, > Hi Harvey, > > > > I am running mariadb 10 on the backend. File mysql-connector- > > java.jar > > is registered under Options -> LibreOffice -> Advanced -> Class > > Path at > > /usr/share/java/ > > For MariaDB I would use the JDBC-connector fro MariaDB, not from > MySQL. > You could get the connector form here: > https://downloads.mariadb.com/Connectors/java/ > Connection to: org.mariadb.jdbc.Driver > For connecting with drivers since version 3.0. you have to add > ?permitMysqlScheme to the database name > test?permitMysqlScheme > will be the connection string for the database 'test'. > > > > I'm not sure I follow what you saying about connection change. I > > haven't changed the connection parameters nor the method. I have > > tried > > setting up the database with an alternative connection method (i.e > > 'Direct'). That succeeds, but I need to transfer all my macros, > > queries, forms and reports from the old .odb to the new one. > > Couldn't you change the connection in the file, which had been > connected > by JDBC? > > Regards > > Robert > -- > Homepage: https://www.familiegrosskopf.de/robert > > For the moment, I have discovered that the name of the file referred to in the Class Path (or the actual file name) had been changed to 'mysql- connector-j.jar- not by me, but possibly during the course of recent repository updates. All works now as before. I would not have noticed it without your inputs, so many thanks for the tips! It seems wise to consider switching to mariadb connectors but for the moment, I won't experiment with the mariadb connectors until I have made sure that Plan Bs are in place. Cheers Harvey -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy