Installing MySQL Connector

Hi :slight_smile:
1.  Don't worry about people being weird on-list.  Not everyone has good people skills as they might have more skill in other crucial areas.  Lets get this back on the list as a new thread.

2.  Dan, Alex, Andreas and Jay have more skill and knowledge about Base than most of us.  Heinrich and i are stumbling our way through with Heinrich gaining hands-on experience in Windows.

Regards from
Tom :slight_smile:

Dear all you LibreO-guys,
It is fantastic that both cunny people and 'dummies' like me can ask for and get help from a community like yours. But.
On another thread, 'spreadsheet or database', one opinion seemed to be that ordinary no-expert 'newies' are afraid of using dbs because they feel it difficult, it requires planning and designing, queries are too complicated, etc. There was a saying about contributions to "lower the barriers" too.
In another thread Andreas said that Base is not a database despite of the embedded HSQLDB - Base is 'only' an front-end tool that requires a "real" database that it shall be connected to.
And now this very long thread explains that such a connection (ODBC) does not work - nothing is said about how or when it will work.
Conclusion: there is no alternative other than to use LO-Base with HSQLDB embedded with all its possible goodies and weaknesses included.
For me this is very frustrating - probably others too. First I had problems to get LO-Base working (JRE) and now when I intend to obey Andreas and connect my LO-Base to either MySQL or SQLite (I need to connect to old MSAccess files too) it will obviously be waist of time and energy. If there is no solution for the problem I must skip LO-Base.
I'm aware of that you seem prefer to lean to Linux ideology (I was very satisfied with Ubuntu for many years myself), but if LO(-Base) is offered to the Windows environment it is of no good to have such an elementary problem unsolved.
I'm sure that you already decided to - or at least planned to - put an effort on solving that ODBC connection problem (and JDBC?) in one way or another, e.g. deciding to have a sufficient and strong enough db-engine embedded or not.

Even if I install the AMPPS package I would like to enjoy LO-Base's flexibility as a report engine - which also seems to be impossible.
Best regards
Pertti Rönnberg

On another thread, 'spreadsheet or database', one opinion seemed to
be that ordinary no-expert 'newies' are afraid of using dbs because
they feel it difficult, it requires planning and designing, queries
are too complicated, etc.

That is not my problem; I've been using databases since about 1985.
I already use MySQL in Linux but for this project I need Windows which
is why I am trying to connect with LO.

embedded HSQLDB -

I found that this doesn't work in Linux but it does in Windows. You
get a window where you can type SQL commands but I found you can do
select and create table but not show tables or describe so it is limited.

And now this very long thread explains that such a connection (ODBC)
does not work

Er... all I said was that it didn't work for me; maybe I'm doing
something wrong.

If there is no solution for the problem I must skip LO-Base.

Don't give up; surely there must be _someone_ who has it working.
Lets try and find them.

a report engine - which also seems to be impossible.

Oh, no.

regards,

Tony

Just a PS to round off this thread. I never did get the MySQL ODBC connector
working but I found that I didn't have to. LO has a connector
libreoffice-mysql-connector that provides a connection to MySQL without
either ODBC or JCBC. This gives me what I want, at least in Linux.
Eventually I want to get LO working with MySQL in Windows XP and it
seems (is this true?) that there is no corresponding extension for
Windows. So I'll go back to working on ODBC, or possibly JDBC, until
I succeed. I'll use linux to work on the schema and come back to
Windows later.

Thanks to everyone. The solution via phpMyAdmin would do very well but
a bit too elaborate for what I want, though I may well use PHP
at some stage. I have a book on PHP and I'm impressed by its capability
and I've started learning it.

Regards from
Tony

Hi Pertti,

What exactly is the issue you have had with using the MySQL JDBC
connector on Windows ?

Documentation :

Prerequisites : a JDK or JRE, access to a running mysql server instance,
either locally or via the network (beware that internet connections to
externally hosted mysql servers can be very slow, or access can be
refused to them by hosting service companies for various security
reasons). The user attempting to connect to the mysql server instance
must have the rights to do so, and also any rights to create, modify ro
change tables, table structures, etc, according to what is desired for
that user. These must be configured in advance within the mysql server.
A database schema (database name) must be created in advance of any
attempt to connect via LO and the JDBC connector.

A useful tool for this is phpmyadmin. This is included in XAMP for
example, which contains a complete apache web server, mysql and php
stack, obtainable here :

http://www.apachefriends.org/fr/xampp-windows.html

via JDBC: (These steps are only valid for the MySQL connector)

Get the newest JDBC driver from

http://www.mysql.com/downloads/connector/j/

Start LibreOffice

Goto Tools > Options > Java

Press the browse button near "Classpath" and browse for the *.jar
file(s) of your driver.

The jar file is part of the zip file that you download from the mysql
website. Look for the file called mysql-connector-java-5.1.18.jar

Restart LibreOffice

Open the data source administration dialog (Tools/Data Sources...) or
start the database wizard.

Press the button "New Data Source", in the name field, enter a valid
name like "MySQL JDBC", and keep "JDBC" as type.

Enter the data source URL
mysql://host:3306/Nameofyourdatabase

Switch to the tab page JDBC. Now you have to enter the driver class
name. For the MySQL connector driver you have to insert:

com.mysql.jdbc.Driver.

You can test that the driver is loaded correctly by pressing the
corresponding button. If the driver doesn't load, then there is either
something wrong with your driver setup or your Java installation.

Enter the name of the user you wish to connect, and mark the checkbox if
this user needs a password.

To be sure that your settings will be saved, press the Apply button.

You can also test the connection by clicking on the appropriate button.
If the connection fails, you will get an error message. If it succeeds,
you will get a message telling you so.

Save your ODB document with an appropriate name.

Once saved, click on the Tables icon in the main Base window, the tables
of your mysql database should appear (if you have defined any in advance).

Alex

Hi Pertti,

What exactly is the issue you have had with using the MySQL JDBC
connector on Windows ?

Documentation :

Prerequisites : a JDK or JRE, access to a running mysql server instance,
either locally or via the network (beware that internet connections to
externally hosted mysql servers can be very slow, or access can be
refused to them by hosting service companies for various security
reasons). The user attempting to connect to the mysql server instance
must have the rights to do so, and also any rights to create, modify ro
change tables, table structures, etc, according to what is desired for
that user. These must be configured in advance within the mysql server.
A database schema (database name) must be created in advance of any
attempt to connect via LO and the JDBC connector.

A useful tool for this is phpmyadmin. This is included in XAMP for
example, which contains a complete apache web server, mysql and php
stack, obtainable here :

http://www.apachefriends.org/fr/xampp-windows.html

via JDBC: (These steps are only valid for the MySQL connector)

Get the newest JDBC driver from

http://www.mysql.com/downloads/connector/j/

Start LibreOffice

Goto Tools> Options> Java

Press the browse button near "Classpath" and browse for the *.jar
file(s) of your driver.

The jar file is part of the zip file that you download from the mysql
website. Look for the file called mysql-connector-java-5.1.18.jar

Restart LibreOffice

Open the data source administration dialog (Tools/Data Sources...) or
start the database wizard.

Press the button "New Data Source", in the name field, enter a valid
name like "MySQL JDBC", and keep "JDBC" as type.

Enter the data source URL
mysql://host:3306/Nameofyourdatabase

Switch to the tab page JDBC. Now you have to enter the driver class
name. For the MySQL connector driver you have to insert:

com.mysql.jdbc.Driver.

You can test that the driver is loaded correctly by pressing the
corresponding button. If the driver doesn't load, then there is either
something wrong with your driver setup or your Java installation.

Enter the name of the user you wish to connect, and mark the checkbox if
this user needs a password.

To be sure that your settings will be saved, press the Apply button.

You can also test the connection by clicking on the appropriate button.
If the connection fails, you will get an error message. If it succeeds,
you will get a message telling you so.

Save your ODB document with an appropriate name.

Once saved, click on the Tables icon in the main Base window, the tables
of your mysql database should appear (if you have defined any in advance).

Alex

Hello Alex (& LibO folks),
Thank you for asking and also for your kind instructions - and I am sorry for my late reply.
No, there are no specific issues, I just reacted to the discussions about connecting problems -- and a lot of other too, especially in version LibO3.5.x.
The reason to my reaction is that I appreciate very much the idea of having a free office suite like LibO and OpenO but I am worried about the strategy of LibO's distribution.
In my vocabulary LibO-Base with it's embedded HSQLDB is a database program, a package like MSAccess with it's JET-engine. My knowledge of databases is limited to some 30 apps in MSAccess (VBA & macros, forms/subforms, reports, etc, but not SQL more than absolutely needed) almost 15 years ago, some of them quite demanding. So, not interested in buying a new MSAccess for my need of 2-4 quite simple databases ( like an address book plus some date calculations, subforms, reports) nor to learn HTML/PHP languages or SQL, I read the introduction and installed LibO3.4.5 (on PC:Win7Prof/32B; on laptop: Win7Prem/64B) in early January this year. Believing that LibO-Base should be sufficient for my need.

I am sure LibO is a powerful package but I have not been able to find this out; I have never experienced a program causing that much problems
>> from the very beginning I had problems first with the installing (no clear info about JRE) then with date calculations that did not work (the embedded HSQL is obviously an old not supported version), then wasting a lot of time and nerves trying to get Report Builder and creating Forms and Subforms in DesignView work as promised in instructions -- they don't!
>> LibO's Help (lifebuoy) opens to a lot of pages telling what different kind of help you can get, but it has not a single link to real immediate help. As an user I shall not be dependent of an ever so fine community's answers, I want to have the help immediately (see MSAccess, OpenO, etc). The LibO documentation and "getting started - Base" seem to be available only for those who know about them or who know where to look -- not for them who are new to the program. The only help of some quality is to be gotten in OpenO why I have had OpenO installed on a second laptop (Vista).
>> when I install a program like LibO I do it because I have a need to do a job, something productive, with it; I must be entitled to trust in the program, that it works reliable. I must not spend hours-days solving out if it is me, my computer, the instructions or the program that fails. Neither am I interested in installing a new version every second week just to get new bugs and other problems to waste my time with .

I have been 'computerized' since early 1980 and have thus used a lot of different programs why I think I am quite a good representative for an ordinary user without skills in programming.
If there is a real goal to get ordinary people, newbies like me, to start using LibO -- not scaring us away -- then my recommendation is:

Stop developing LibO at a known stable version (e.g. LibO3.4.5) and start a thorough checking run to find out, fix and ensure that every detail and tool, instruction and function works as it is meant (promised) to, that the terms and references used are equal both in menus, toolbars and help
>> if LibO-Base is meant to have a embedded db-engine then select one that is sufficient and up-to-date and is supported by a reasonable good documentation -- and is to be upgraded
>> create a reliable connector (or link to one) that has sufficient instructions, that connects LibO to that db-engine without any kind of problems -- a connection that every newbie can manage
>> all necessary info (install, JRE, get started, documentation) must be put on or at least have clear links to a collecting page (LibO's own home page) where all that guidance can be easily found and gives directly help
>> the help must include clear enough basic step-by-step examples on how to do
When that version absolute certainly works perfect, then distribute it and continue with the developing from that controlled basis.

Just some examples:
>> a subform created with the wizard does not recognize relationship made between the two forms
>> "getting started with Base" tells how to create a form and a subform with the wizard but refers to a "database guide" for to create them in DesignView -- where is that db-guide?

A good idea when writing instructions, guides, manuals (etc.) is to let some no-experts not only read it but also practically follow the instructions to check if the info is understandable, logic and correct -- the expert author is too often forgetting that the remote reader may be a total novice.

All this is of course only my opinion based on my experiences.
I thank you all and wish LibreOffice and it's supporters and developers all the best.
Pertti Rönnberg

>
> Hi Pertti,
>
>
> What exactly is the issue you have had with using the MySQL JDBC
> connector on Windows ?
>
> Documentation :
>
> Prerequisites : a JDK or JRE, access to a running mysql server instance,
> either locally or via the network (beware that internet connections to
> externally hosted mysql servers can be very slow, or access can be
> refused to them by hosting service companies for various security
> reasons). The user attempting to connect to the mysql server instance
> must have the rights to do so, and also any rights to create, modify ro
> change tables, table structures, etc, according to what is desired for
> that user. These must be configured in advance within the mysql server.
> A database schema (database name) must be created in advance of any
> attempt to connect via LO and the JDBC connector.
>
> A useful tool for this is phpmyadmin. This is included in XAMP for
> example, which contains a complete apache web server, mysql and php
> stack, obtainable here :
>
> http://www.apachefriends.org/fr/xampp-windows.html
>
>
> via JDBC: (These steps are only valid for the MySQL connector)
>
> Get the newest JDBC driver from
>
> http://www.mysql.com/downloads/connector/j/
>
> Start LibreOffice
>
> Goto Tools> Options> Java
>
> Press the browse button near "Classpath" and browse for the *.jar
> file(s) of your driver.
>
> The jar file is part of the zip file that you download from the mysql
> website. Look for the file called mysql-connector-java-5.1.18.jar
>
> Restart LibreOffice
>
> Open the data source administration dialog (Tools/Data Sources...) or
> start the database wizard.
>
> Press the button "New Data Source", in the name field, enter a valid
> name like "MySQL JDBC", and keep "JDBC" as type.
>
> Enter the data source URL
> mysql://host:3306/Nameofyourdatabase
>
> Switch to the tab page JDBC. Now you have to enter the driver class
> name. For the MySQL connector driver you have to insert:
>
> com.mysql.jdbc.Driver.
>
> You can test that the driver is loaded correctly by pressing the
> corresponding button. If the driver doesn't load, then there is either
> something wrong with your driver setup or your Java installation.
>
> Enter the name of the user you wish to connect, and mark the checkbox if
> this user needs a password.
>
> To be sure that your settings will be saved, press the Apply button.
>
> You can also test the connection by clicking on the appropriate button.
> If the connection fails, you will get an error message. If it succeeds,
> you will get a message telling you so.
>
> Save your ODB document with an appropriate name.
>
> Once saved, click on the Tables icon in the main Base window, the tables
> of your mysql database should appear (if you have defined any in advance).
>
>
>
> Alex
>
>
>
>
Hello Alex (& LibO folks),
Thank you for asking and also for your kind instructions - and I am
sorry for my late reply.
No, there are no specific issues, I just reacted to the discussions
about connecting problems -- and a lot of other too, especially in
version LibO3.5.x.
The reason to my reaction is that I appreciate very much the idea of
having a free office suite like LibO and OpenO but I am worried about
the strategy of LibO's distribution.
In my vocabulary LibO-Base with it's embedded HSQLDB is a database
program, a package like MSAccess with it's JET-engine. My knowledge of
databases is limited to some 30 apps in MSAccess (VBA & macros,
forms/subforms, reports, etc, but not SQL more than absolutely needed)
almost 15 years ago, some of them quite demanding. So, not interested
in buying a new MSAccess for my need of 2-4 quite simple databases (
like an address book plus some date calculations, subforms, reports) nor
to learn HTML/PHP languages or SQL, I read the introduction and
installed LibO3.4.5 (on PC:Win7Prof/32B; on laptop: Win7Prem/64B) in
early January this year. Believing that LibO-Base should be sufficient
for my need.

I am sure LibO is a powerful package but I have not been able to find
this out; I have never experienced a program causing that much problems
>> from the very beginning I had problems first with the installing
(no clear info about JRE) then with date calculations that did not work
(the embedded HSQL is obviously an old not supported version), then
wasting a lot of time and nerves trying to get Report Builder and
creating Forms and Subforms in DesignView work as promised in
instructions -- they don't!
>> LibO's Help (lifebuoy) opens to a lot of pages telling what
different kind of help you can get, but it has not a single link to real
immediate help. As an user I shall not be dependent of an ever so fine
community's answers, I want to have the help immediately (see MSAccess,
OpenO, etc). The LibO documentation and "getting started - Base" seem to
be available only for those who know about them or who know where to
look -- not for them who are new to the program. The only help of some
quality is to be gotten in OpenO why I have had OpenO installed on a
second laptop (Vista).
>> when I install a program like LibO I do it because I have a need
to do a job, something productive, with it; I must be entitled to trust
in the program, that it works reliable. I must not spend hours-days
solving out if it is me, my computer, the instructions or the program
that fails. Neither am I interested in installing a new version every
second week just to get new bugs and other problems to waste my time with .

I have been 'computerized' since early 1980 and have thus used a lot of
different programs why I think I am quite a good representative for an
ordinary user without skills in programming.
If there is a real goal to get ordinary people, newbies like me, to
start using LibO -- not scaring us away -- then my recommendation is:

Stop developing LibO at a known stable version (e.g. LibO3.4.5) and
start a thorough checking run to find out, fix and ensure that every
detail and tool, instruction and function works as it is meant
(promised) to, that the terms and references used are equal both in
menus, toolbars and help
>> if LibO-Base is meant to have a embedded db-engine then select
one that is sufficient and up-to-date and is supported by a reasonable
good documentation -- and is to be upgraded
>> create a reliable connector (or link to one) that has sufficient
instructions, that connects LibO to that db-engine without any kind of
problems -- a connection that every newbie can manage
>> all necessary info (install, JRE, get started, documentation)
must be put on or at least have clear links to a collecting page (LibO's
own home page) where all that guidance can be easily found and gives
directly help
>> the help must include clear enough basic step-by-step examples on
how to do
When that version absolute certainly works perfect, then distribute it
and continue with the developing from that controlled basis.

Just some examples:
>> a subform created with the wizard does not recognize relationship
made between the two forms
>> "getting started with Base" tells how to create a form and a
subform with the wizard but refers to a "database guide" for to create
them in DesignView -- where is that db-guide?

     Here: (They are still in Draft form and written for OOo.)
http://www.odfauthors.org/openoffice.org/english/userguide3/db3/dbg3_draft/data-input-and-removal/view
     For the first four chapters of the Base Guide (for OOo and all
drafts):
http://www.odfauthors.org/openoffice.org/english/userguide3/db3/dbg3_draft/

Tom and Dan,
Thank you for your kind replies. I was almost expecting a lynch mob outside my front door this morning!

To Dan:
Thanks for the fine links. They look very good. I have now read them (Base part) and shall later begin to work them in practice.
If I only had had this fine basic info not only in January but fifteen years ago!
Some questions:
1 >> These drafts are written for OpenO (v3.2-3.3) in 2010 -- are they still drafts or are they final?
2 >> do they apply also to LibreO -- if yes, from what version on (LibO3.4.xx)?
3 >> I may have some ideas to propose -- to whom is it best to address them; can I get a separate mail address or shall I handle them on this mailing list?
Best regards
Pertti Rönnberg

Hi :slight_smile:
It's always good to see that someone cares that much.  Many people have got heavily involved because they like the project and see a lot of potential for it but get frustrated or annoyed by "one little thing" and realise they can actively do something to fix it.  Then "mission creep" sweeps them up into heavy involvement.

So, when i see a comment like yours i just think "Welcome in" :slight_smile:
Regards from
Tom :slight_smile:

<Huge Snip>

Tom and Dan,
Thank you for your kind replies. I was almost expecting a lynch mob
outside my front door this morning!

To Dan:
Thanks for the fine links. They look very good. I have now read them
(Base part) and shall later begin to work them in practice.
If I only had had this fine basic info not only in January but fifteen
years ago!
Some questions:
1 >> These drafts are written for OpenO (v3.2-3.3) in 2010 -- are
they still drafts or are they final?
2 >> do they apply also to LibreO -- if yes, from what version on
(LibO3.4.xx)?
3 >> I may have some ideas to propose -- to whom is it best to
address them; can I get a separate mail address or shall I handle them
on this mailing list?
Best regards
Pertti Rönnberg

     These are all drafts and apply to LO 3.4.6. I haven't checked
against 3.5.x just yet because it is not stable enough yet.
     Base has not changed very much since it was first introduced in OOo
2.0.0, so the principles contained in them apply even today.I am doing a
rewrite for LO 3.4.6 for the first 4 chapters: Introducing Base,
Planning/Designing Your Database, Data Input and Removal, and Data
Output.
     While still a draft, the first 2 chapters for LO are on the
Document Foundation website: (These are a newer than the OOo draft
chapters in the link I mentioned earlier)
http://wiki.documentfoundation.org/Documentation/Publications/.
     Proposals are welcome! You can send them directly to me using the
same email address at the top of this message.

--Dan