You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openoffice.apache.org by Ian Whitfield <wh...@telkomsa.net> on 2012/09/26 12:46:52 UTC

Connecting to MySQL problem.

Hi All - Can anyone help me out please!!??

I want to transfer my Database from the embedded DB to a MySQL DB. I'm 
using PCLinuxOS 2012 and AOO 3.4.0.

  * I Created a new empty SQL DB on my WebServer, with all my fields,
    using phpMySQLAdmin.
  * I exported this DB back to my home computer. It comes out as a
    'filename.sql' and seems to be a text document. (If I "open" this
    file it opens in my HTML Editor!!)
  * I downloaded and extracted 'mysql-connector-java-5.1.22.tar.gz'.
    After extraction I have 'mysql-connector-java-5.1.22-bin.jar' in a
    folder '/home/ian/Database'.
  * I have MySQL loaded and the service IS running. (Checked with
    Control Center)
  * I DO have Java installed with Office (Sun Microsystems 1.6.0_21)
  * I start Base and select 'Connect to existing DB' - JDBC
  * Under Datasource I select the above 'Filename.sql' file.
  * Under JDBC Class I select
    '/home/ian/Database/mysql-connector-java-5.1.22-bin.jar'
  * I select 'Test Class' and get the error "The JDBC Driver could not
    be loaded".

Where is the problem and how do I get round it??

My requirements are a single user on a single machine!!

Also what other problems am I likely to come across as I proceed?

Thanks for any help.

IanW
Pretoria SA


Re: Connecting to MySQL problem.

Posted by "Girvin R. Herr" <gi...@sbcglobal.net>.

Ian Whitfield wrote:
> Hi All - Can anyone help me out please!!??
>
> I want to transfer my Database from the embedded DB to a MySQL DB. I'm 
> using PCLinuxOS 2012 and AOO 3.4.0.
>
> * I Created a new empty SQL DB on my WebServer, with all my fields,
> using phpMySQLAdmin.
> * I exported this DB back to my home computer. It comes out as a
> 'filename.sql' and seems to be a text document. (If I "open" this
> file it opens in my HTML Editor!!)
> * I downloaded and extracted 'mysql-connector-java-5.1.22.tar.gz'.
> After extraction I have 'mysql-connector-java-5.1.22-bin.jar' in a
> folder '/home/ian/Database'.
> * I have MySQL loaded and the service IS running. (Checked with
> Control Center)
> * I DO have Java installed with Office (Sun Microsystems 1.6.0_21)
> * I start Base and select 'Connect to existing DB' - JDBC
> * Under Datasource I select the above 'Filename.sql' file.
> * Under JDBC Class I select
> '/home/ian/Database/mysql-connector-java-5.1.22-bin.jar'
> * I select 'Test Class' and get the error "The JDBC Driver could not
> be loaded".
>
> Where is the problem and how do I get round it??
>
> My requirements are a single user on a single machine!!
>
> Also what other problems am I likely to come across as I proceed?
>
> Thanks for any help.
>
> IanW
> Pretoria SA
>
>
Ian,
It sounds like you have some more work to do before you get into Base 
and the driver installation. Here is an excerpt from my computer notes 
which I use to bring up MySQL and Base whenever I upgrade my system from 
scratch. Some of these steps you may have already done or are not 
needed, such as the initial MySQL database backup:


      Pre-installation

Back up the current database, if there is one, by entering:

"mysqldump --user=root -p --opt <database_name> > /tmp/<database_name>.sql"

where <database_name> is the name of the database. This will generate a 
set of SQL commands to use in re-creating the database. If there is more 
than one database, create separate dumps for each one. DO NOT DUMP THE 
MySQL DATABASES {mysql, test, anonymous, etc.}. These should be created 
fresh from the new MySQL program (see below). Restoring these could 
propagate a corrupted system.

*MySQL Installation and Setup
*

To install, run the following from a shell.
Note that the file locations may vary by system. This procedure is for a 
Slackware Linux system:

    *

      Execute "chmod +x /etc/rc.d/rc.mysqld".
      rc.mysqld is a Slackware script that starts/stops/restarts the
      MySQL server.

    *

      Enter: "cp /etc/my-huge.cnf /etc/my.cfg".
      to copy mysql huge configuration to be the default. Note that
      there are other configuration files for smaller systems. I have 1
      GB of RAM and huge works fine for me.

    *

      Enter "/usr/bin/mysql_install_db --user=mysql"
      to set up standard MySQL databases. This MUST be done!

    *

      Enter: "/etc/rc.d/rc.mysqld start"
      to start the MySQL daemon (server).

    *

      Enter: "mysql_secure_installation"
      to set the mysql root password, remove the "test" database, and
      remove network root access. This program will prompt for these items.

    *

      Enter: "mysql --user=root -p mysql"
      to bring up the MySQL monitor (interpreter) program. While in this
      program, the prompt will change to "MySQL> ". Enter the following
      commands, terminated by a semicolon (;) and Enter:

      GRANT ALL PRIVILEGES ON *.* TO <username>@localhost IDENTIFIED BY
      '<password>' WITH GRANT OPTION;

      GRANT ALL PRIVILEGES ON *.* TO <username>@"%" IDENTIFIED BY
      '<password>' WITH GRANT OPTION;

      GRANT ALL PRIVILEGES ON *.* TO admin@localhost IDENTIFIED BY
      '<password>' WITH GRANT OPTION;

      GRANT RELOAD,PROCESS ON *.* TO admin@localhost ;

      CREATE DATABASE <database_name>;

      exit

These commands will set up the <username> user and <password> passwords 
and create the <database_name> empty database. If there are additional 
databases, CREATE those also. Next, load the database data by entering 
the following command as root:

"mysql --user=root -p <database_name> < <data_name>.sql"


The <database_name> database should now be ready for access by OO.o 
Base. If there are additional databases dumped in the pre-installation 
paragraph, then restore them also.


      OO.o Base Fails to Connect But mysql Interpreter Works

If OpenOffice Base fails to connect to the MySQL database, but the mysql 
interpreter works fine, then do the following:

In "etc/rc.d/rc.mysql", verify that the line beginning with "SKIP=" is 
commented out. If it is not commented out then do so. This line 
instructs the mysqld server to disable net access. OO.o Base uses 
"localhost" to access a database. Commenting out this line enables 
"localhost" access.


    OpenOffice

Base Fails to Open Java Driver

If the MySQL Connector Java driver is already installed when OO.o is 
installed, the new OO.o will not see the driver and produce an error 
message about not being able to load the driver. You need to tell OO.o 
where the driver jar is located. Do:

Tools > Options... > OpenOffice.org > java > Class Path... > Add Archive...

and drill down to the driver jar. An example of this is 
“mysql-connector-java-5.0.7-bin.jar” located in “/usr/java/jars/.”. 
Note: Do not select the “...-g-bin.jar” version! This is a debug version 
and will be very slow. After this is done, then Base should access the 
MySQL database without error.
Note that there is a pause after "java". Wait for OO to find the Java 
packages you have installed and list them in the window. It shouldn't 
take more than a few seconds, but it seems like a long time and OO has 
crashed - it hasn't. If you have more Java packages than one, make sure 
you select the Java you want to use first.

Notes:

   1. Keep in mind that these procedures are for a Slackware Linux
      system. Your system may vary slightly.
   2. The <data_name>.sql file should have the data in it already. This
      is done by the mysqldump program, which creates an SQL executable
      file that removes the original database and re-creates the
      structure and data at restore time.
   3. It has been a long time, but I once moved Microsoft Access data to
      MySQL using the comma separated value (CSV) format. MySQL will
      import CSV data files, but I don't remember how I did it. If you
      need that process, I can try researching how I did it for you.
   4. Keep in mind that OO Base is a database _client._ That means it
      can make some database operations convenient, but you still must
      set up the database in MySQL first. Base will not do that for you.
   5. As you have already been told, the MySQL "root" user is not the
      same as the system root user. You can use the root password for
      MySQL's root during the setup, but I do not advise that for
      security reasons. Pick another password.
   6. Another good information source is the MySQL Reference Manual,
      which is supplied with MySQL or on the MySQL website. It should be
      in the MySQL docs directory on your system. It has chapters on
      installation and setup with step-by-step instructions. Most of
      what I outlined above came directly from that manual.
   7. These steps must be performed in the proper sequence or your Base
      connection may fail.
   8. Quotes (") and brackets (< >) are not to be included in any command.

Hope this helps. Good luck.
Girvin Herr







---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Alexander Thurgood <al...@gmail.com>.
Le 26/09/12 15:58, Ian Whitfield a écrit :

Hi Ian,

> I entered
> 
> "mysql -h localhost  -u root -p"
> 
> in Konsole and got error "Access denied for user 'root'@'localhost'
> (using password: YES)"
> So re-installed _ALL_ MySQL packages again and tried once more
> Same result!!

Try it without the -p parameter. On some default installations, even the
root user doesn't have a password.

So just :

mysql -u root

You shouldn't have to specify "-h localhost" if you are connecting to
the server on the same machine.


Alex



---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Reizinger Zoltán <zr...@hdsnet.hu>.
2012.09.26. 15:58 keltezéssel, Ian Whitfield írta:
>
> On 09/26/2012 03:23 PM, Reizinger Zoltán wrote:
>> u needs this out Base directly in MYSQL:
>> http://www.debian-administration.org/articles/39
>> This shows how to create database and user in mySQL.
>
> I entered
>
> "mysql -h localhost  -u root -p"
>
> in Konsole and got error "Access denied for user 'root'@'localhost' 
> (using password: YES)"
> So re-installed _ALL_ MySQL packages again and tried once more
> Same result!!
>
You needs to find mysql related information on PCLinuxOS forums, and 
documentation.
You needs to find, which is a default password for root userin mysql, 
usually
  it is different from linux root password, and it is differ from distro 
packagers.
Zoltan
> (I only have two password on this system 'user' and 'SU' and both work 
> OK with other programs but neither will work in MySQL!!??)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
> For additional commands, e-mail: ooo-users-help@incubator.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Ian Whitfield <wh...@telkomsa.net>.
On 09/26/2012 03:23 PM, Reizinger Zoltán wrote:
> u needs this out Base directly in MYSQL:
> http://www.debian-administration.org/articles/39
> This shows how to create database and user in mySQL.

I entered

"mysql -h localhost  -u root -p"

in Konsole and got error "Access denied for user 'root'@'localhost' 
(using password: YES)"
So re-installed _ALL_ MySQL packages again and tried once more
Same result!!

(I only have two password on this system 'user' and 'SU' and both work 
OK with other programs but neither will work in MySQL!!??)


---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Reizinger Zoltán <zr...@hdsnet.hu>.
2012.09.26. 15:06 keltezéssel, Ian Whitfield írta:
>
> On 09/26/2012 01:59 PM, Reizinger Zoltán wrote:
>> Your PCLinuxOS 64 or 32 bit version?
>> You created a user in MySQL which you will use?
>> You have a database in MySQL which you will use?
>>
>> Try other driver if you not succed:
>> Download native driver 32 or 64 bit version which is good for your 
>> linux: 
>> http://code.google.com/a/apache-extras.org/p/aoo-my-sdbc/downloads/list
>> Add extension, restart AOO.
>> Create new odb file, select MySQL in existing database.
>> Add your server, database: 
>> http://wiki.openoffice.org/wiki/Database/Drivers/MySQL_Native/1.0
>> Zoltan
> Thanks again Zoltan
>
> My Linux is 32-bit and as I mentioned in my first post I created a DB 
> on my WebServer and pulled it down to my computer here.
>
> Created a new user in MySQL - NO!! How do I do this and at the moment 
> can't get past the connector problem!!
You needs this out Base directly in MYSQL:
http://www.debian-administration.org/articles/39
This shows how to create database and user in mySQL.
>
> I downloaded the AOO Driver you suggested and it installed as a 
> Extension.
> If I now try to connect to my DB it says "The connection to the data 
> source 'Filename.sql' could not be established.
Forget it for short time, the .sql files contain only webserver table 
structure and no data. It can not be used within Base without further 
works, after connection creation.
Select third option, described in sended second wiki page.

> The driver class 'com.mysql.jbc.Driver' could not be loaded."
>
It needs only in JDBC case, it shows something wrong with the driver, 
download older JDBC driver and try it, first remove the defect one from 
classes.
> If I try to create a new DB it only gives me the option of ODF!!
Create Database in MySQL.
Zoltan
>
> IanW
> Pretoria SA
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
> For additional commands, e-mail: ooo-users-help@incubator.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Ian Whitfield <wh...@telkomsa.net>.
On 09/26/2012 01:59 PM, Reizinger Zoltán wrote:
> Your PCLinuxOS 64 or 32 bit version?
> You created a user in MySQL which you will use?
> You have a database in MySQL which you will use?
>
> Try other driver if you not succed:
> Download native driver 32 or 64 bit version which is good for your 
> linux: 
> http://code.google.com/a/apache-extras.org/p/aoo-my-sdbc/downloads/list
> Add extension, restart AOO.
> Create new odb file, select MySQL in existing database.
> Add your server, database: 
> http://wiki.openoffice.org/wiki/Database/Drivers/MySQL_Native/1.0
> Zoltan
Thanks again Zoltan

My Linux is 32-bit and as I mentioned in my first post I created a DB on 
my WebServer and pulled it down to my computer here.

Created a new user in MySQL - NO!! How do I do this and at the moment 
can't get past the connector problem!!

I downloaded the AOO Driver you suggested and it installed as a Extension.
If I now try to connect to my DB it says "The connection to the data 
source 'Filename.sql' could not be established. The driver class 
'com.mysql.jbc.Driver' could not be loaded."

If I try to create a new DB it only gives me the option of ODF!!

IanW
Pretoria SA


---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Reizinger Zoltán <zr...@hdsnet.hu>.
2012.09.26. 13:22 keltezéssel, Ian Whitfield írta:
> On 09/26/2012 01:10 PM, Reizinger Zoltán wrote:
>> 2012.09.26. 12:46 keltezéssel, Ian Whitfield írta:
>>> Hi All - Can anyone help me out please!!??
>>>
>>> I want to transfer my Database from the embedded DB to a MySQL DB. 
>>> I'm using PCLinuxOS 2012 and AOO 3.4.0.
>> Follow this, for creation database connection:
>> http://wiki.openoffice.org/wiki/Connect_MySQLandBase 
>
> Thanks Zoltan
>
> But this _IS_ the page I have been using!!!!
>
> It gives no indication of any error message or any notes on what to do 
> if you get such a message at this stage of the connection.
Your PCLinuxOS 64 or 32 bit version?
You created a user in MySQL which you will use?
You have a database in MySQL which you will use?

Try other driver if you not succed:
Download native driver 32 or 64 bit version which is good for your 
linux: 
http://code.google.com/a/apache-extras.org/p/aoo-my-sdbc/downloads/list
Add extension, restart AOO.
Create new odb file, select MySQL in existing database.
Add your server, database: 
http://wiki.openoffice.org/wiki/Database/Drivers/MySQL_Native/1.0
Zoltan
>
> IanW
> Pretoria SA
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
> For additional commands, e-mail: ooo-users-help@incubator.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Ian Whitfield <wh...@telkomsa.net>.
On 09/26/2012 01:10 PM, Reizinger Zoltán wrote:
> 2012.09.26. 12:46 keltezéssel, Ian Whitfield írta:
>> Hi All - Can anyone help me out please!!??
>>
>> I want to transfer my Database from the embedded DB to a MySQL DB. 
>> I'm using PCLinuxOS 2012 and AOO 3.4.0.
> Follow this, for creation database connection:
> http://wiki.openoffice.org/wiki/Connect_MySQLandBase 

Thanks Zoltan

But this _IS_ the page I have been using!!!!

It gives no indication of any error message or any notes on what to do 
if you get such a message at this stage of the connection.

IanW
Pretoria SA

---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Reizinger Zoltán <zr...@hdsnet.hu>.
2012.09.26. 12:46 keltezéssel, Ian Whitfield írta:
> Hi All - Can anyone help me out please!!??
>
> I want to transfer my Database from the embedded DB to a MySQL DB. I'm 
> using PCLinuxOS 2012 and AOO 3.4.0.
Follow this, for creation database connection:
http://wiki.openoffice.org/wiki/Connect_MySQLandBase

Creation of database structure and data input, use MySQL tools, such 
MySQL Workbench, not tha AOO Base.
Zoltan
>
>  * I Created a new empty SQL DB on my WebServer, with all my fields,
>    using phpMySQLAdmin.
>  * I exported this DB back to my home computer. It comes out as a
>    'filename.sql' and seems to be a text document. (If I "open" this
>    file it opens in my HTML Editor!!)
>  * I downloaded and extracted 'mysql-connector-java-5.1.22.tar.gz'.
>    After extraction I have 'mysql-connector-java-5.1.22-bin.jar' in a
>    folder '/home/ian/Database'.
>  * I have MySQL loaded and the service IS running. (Checked with
>    Control Center)
>  * I DO have Java installed with Office (Sun Microsystems 1.6.0_21)
>  * I start Base and select 'Connect to existing DB' - JDBC
>  * Under Datasource I select the above 'Filename.sql' file.
>  * Under JDBC Class I select
>    '/home/ian/Database/mysql-connector-java-5.1.22-bin.jar'
>  * I select 'Test Class' and get the error "The JDBC Driver could not
>    be loaded".
>
> Where is the problem and how do I get round it??
>
> My requirements are a single user on a single machine!!
>
> Also what other problems am I likely to come across as I proceed?
>
> Thanks for any help.
>
> IanW
> Pretoria SA
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Alexander Thurgood <al...@gmail.com>.
Le 26/09/12 16:53, Alexander Thurgood a écrit :

> and images aren't supported by the JDBC driver, only the native
> Connector C++ driver.


Correction : images are supported by the JDBC driver, but their size is
limited by :

- the field definition, i.e. LONGVARCHAR(binary), BLOB type (MEDIUM,
LARGE, etc) ;

- the MAX_ALLOWED_PACKET setting in the my.cnf server configuration
settings.


I should have said that videos, instead of images, are not supported by
the JDBC driver, at least not to my knowledge.

Even with images, you will not see the binary string representation in
the table if you open the table. You can only add images to the table
via a form that you would have to create.


Alex



---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Alexander Thurgood <al...@gmail.com>.
Le 26/09/12 12:46, Ian Whitfield a écrit :

Hi Ian,

> Hi All - Can anyone help me out please!!??
> 

I'm beginning to believe that you are jinxed when it comes to db problems

;-)

> I want to transfer my Database from the embedded DB to a MySQL DB. I'm
> using PCLinuxOS 2012 and AOO 3.4.0.
> 
>  * I Created a new empty SQL DB on my WebServer, with all my fields,
>    using phpMySQLAdmin.
>  * I exported this DB back to my home computer. It comes out as a
>    'filename.sql' and seems to be a text document. (If I "open" this
>    file it opens in my HTML Editor!!)


As others have said, this is of absolutely no use to you in order to
setup a JDBC connection to your local mysql server from within AOO.



>  * I downloaded and extracted 'mysql-connector-java-5.1.22.tar.gz'.
>    After extraction I have 'mysql-connector-java-5.1.22-bin.jar' in a
>    folder '/home/ian/Database'.

What are the read/write permissions on that folder ?

Now, start up AOO, go to Tools>Options
Under Java, wait for AOO to recognise your version of Java, then click
on the "Classpath" button followed by "Add an archive". Navigate to your
/home/ian/Database folder and double-click on the jar file.

Click on OK and OK again, to come back to the general Java configuration
screen of AOO. If you get an error at any stage of the above
selection/validation of the Jar archive, then you have something wrong
with either :

- your permissions on the folder ;
- your version of Java or the version of the jar file (although the
latter is less likely).

One way around the potential permissions problem is to copy the jar file
to the "Ext" or "Extensions" directory of your Java installation.
Usually, this is something like /usr/share/java or /usr/local/java,
depending on the Linux distro you are using. You will need to copy the
file as sudo or root.

If you get an error message when trying to add the archive, please tell
us what it is, exactly.


>  * I start Base and select 'Connect to existing DB' - JDBC
>  * Under Datasource I select the above 'Filename.sql' file.

Select MySQL from the dropdown list instead of JDBC. Then in the next
wizard screen, select "use JDBC (Java Database connectivity)".

Under datasource, please enter the exact name of the database as you
created it on your webserver. So, if the name of the db you created with
phpmyadmin is called "test", enter "test" as the datasource name.

Enter 127.0.0.1 as the server

The default port for most Linux distributions running a mysql server is
3306, so you shouldn't need to change this.


>  * Under JDBC Class I select
>    '/home/ian/Database/mysql-connector-java-5.1.22-bin.jar'
>  * I select 'Test Class' and get the error "The JDBC Driver could not
>    be loaded".

Using the MySQL connection choice as indicated above, the driver string
is preloaded for you :

com.mysql.jdbc.Driver

You can test whether the driver is loaded properly by AOO by clicking on
the "Test class" button.

Clicking on "Next" will take you to the next screen of the wizard where
it will ask you for a user name authorised to connect to the database.
Depending on whether or not you have previously added yourself as a user
to the mysql server, you will have a choice of :

- your user name, if you have created a user account with the mysql
server, or one was created for you when you installed the server on your
machine ;

- root ;

- phpmyadmin ;

- pma (possibly, if you have the PMA extension installed for phpmyadmin);

- possibly another admin user, that goes by various names depending on
your distro (db-maintainer, dbconf-maintainer, or something like that).


If you require a password to connect as any of those users, then tick
the checkbox and then try to connect by clicking the "Connect" button.

On some Linux installations, no password is set by default for the root
user. If this is the case with your mysql server, it is potentially a
major security flaw that you should correct as soon as possible through
the administration utilities for that server (command line, or MySQL
Control Center if you prefer a graphical interface)

Things to look out for :

Empty DateTime strings, i.e. null dates, represented as "0000-00-00",
are not supported by the JDBC connector and cause an error to be thrown,
which can lead to a crash in AOO when you browse tables in the tree
hierarchy view ;

AOO has a really annoying behaviour, at least on Mac OSX, of toggling a
table representation (i.e. when you double click on a table in the list
of tables from the main ODB window), to put it behind the main Base ODB
container window, forcing the user to go and find that window with the
mouse to bring it to the foreground focus. If you are in full screen
mode with your main Base ODB container, it looks like the window just
appears then disappears almost instantaneously. This was also a bug in
LO for a while, but which has since been fixed - good job too, because
it drove me nuts !

Browsing Tables in the DataSourceBrowser (AOO F4 or corresponding toggle
icon) whilst descending the hierarchical tree view from a table with
more columns to a table with fewer columns will cause AOO to crash;

JDBC performance is worse than with the native C++ connector driver,
especially with large result sets or multiple join queries - there is no
rememdy for that, I'm afraid - these performance issues are less/greater
depending on the version of Java you have installed on your machine and
recognised by AOO - even with a "good" Java version connecting to a
locally hosted mysql server, performance is noticeably slower, e.g.
scrolling operations, screen refreshing, queries, etc ;

Certain features that are available in MySQL, are not supported over the
JDBC connector and will lead to a table representation of <OBJECT>, with
nothing visible for you to look at instead of your data. These <objects>
are usually, but not exclusively, binary objects. In AOO, there is
currently no support in the AOO code for CLOB objects other than images,
and images aren't supported by the JDBC driver, only the native
Connector C++ driver.


Alex



---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Ian Whitfield <wh...@telkomsa.net>.
On 09/26/2012 02:08 PM, Dan Lewis wrote:
> Do you have a MySQL server running on your WebServer, but do you have 
> a MySQL server running on your home computer?
I have MySQL Server, MySQL Client, phpMySQLAdmin all installed and 
'Services' report that MySQL starts at boot.
> 'filename.sql' contains the information about the empty database you 
> created in MySQL, but you can not connect to it using Base. You should 
> install a MySQL server on your home computer and import 'filename.sql' 
> using phpMySQLAdmin. Make sure you create a user name and password for 
> yourself using phpMySQLAdmin. Make sure you also include a server name 
> associated with your name as well. (I use dan%local host.)
Oh - I see!! OK will give this a go. (How do I start MySQLAdmin on my 
local machine??)
> Tool -> Options -> OpenOffice.org -> JAVA -> Class Path. Click 'Add 
> Archive'. Browse to 
> '/home/ian/Database/mysql-connector-java-5.1.22-bin.jar' and click 
> Open. Close the Class Path and Options windows clicking OK twice.
Did this - that's when I get the error message!!!
> Suggestion on connecting to MySQL: in the Database Wizard, select 
> MySQL in the dropdown list instead of JDBC. Click Next. Select 
> 'Connect using JDBC' and click Next. For the database name use the 
> name you gave the database. For the server, use the one you created 
> with your user name. Click Next. Enter your user name in the box and 
> click the 'Password required' check box. Now if you click the Test 
> Connection button, you should get a connection.
I did all this but still get the 'Could not load JBDC Driver' error!!!
> Personally, I have a MySQL server running on my computer. I have also 
> downloaded the MySQL Connector 1.0.1 extension and installed it. My 
> steps to connect to the MySQL server: I selected MySQL in the bottom 
> dropdown list instead of JDBC. For Step #2, I clicked 'Connect 
> directly'. For Step #3, I entered the name of the database (schema) 
> that I want to access, and 'localhost' as the server. For Step #4: I 
> enter my user name and checked 'Password required'. This works for AOO 
> 3.4.1.
>
> --Dan

Thanks Dan - I have replied above.

Two points that concern me - How to get past the Driver problem and How 
do I make use of the empty DB I created  (once I get to this point)??

IanW
Pretoria SA

---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Connecting to MySQL problem.

Posted by Dan Lewis <el...@gmail.com>.
On 09/26/2012 06:46 AM, Ian Whitfield wrote:
> Hi All - Can anyone help me out please!!??
>
> I want to transfer my Database from the embedded DB to a MySQL DB. I'm 
> using PCLinuxOS 2012 and AOO 3.4.0.
>
>  * I Created a new empty SQL DB on my WebServer, with all my fields,
>    using phpMySQLAdmin.
>  * I exported this DB back to my home computer. It comes out as a
>    'filename.sql' and seems to be a text document. (If I "open" this
>    file it opens in my HTML Editor!!)
>  * I downloaded and extracted 'mysql-connector-java-5.1.22.tar.gz'.
>    After extraction I have 'mysql-connector-java-5.1.22-bin.jar' in a
>    folder '/home/ian/Database'.
>  * I have MySQL loaded and the service IS running. (Checked with
>    Control Center)
>  * I DO have Java installed with Office (Sun Microsystems 1.6.0_21)
>  * I start Base and select 'Connect to existing DB' - JDBC
>  * Under Datasource I select the above 'Filename.sql' file.
>  * Under JDBC Class I select
>    '/home/ian/Database/mysql-connector-java-5.1.22-bin.jar'
>  * I select 'Test Class' and get the error "The JDBC Driver could not
>    be loaded".
>
> Where is the problem and how do I get round it??
>
> My requirements are a single user on a single machine!!
>
> Also what other problems am I likely to come across as I proceed?
>
> Thanks for any help.
>
> IanW
> Pretoria SA
      You have a MySQL server running on your WebServer, but do you have 
a MySQL server running on your home computer?
'filename.sql' contains the information about the empty database you 
created in MySQL, but you can not connect to it using Base. You should 
install a MySQL server on your home computer and import 'filename.sql' 
using phpMySQLAdmin. Make sure you create a user name and password for 
yourself using phpMySQLAdmin. Make sure you also include a server name 
associated with your name as well. (I use dan%local host.)
      Tool -> Options -> OpenOffice.org -> JAVA -> Class Path. Click 
'Add Archive'. Browse to 
'/home/ian/Database/mysql-connector-java-5.1.22-bin.jar' and click Open. 
Close the Class Path and Options windows clicking OK twice.
      Suggestion on connecting to MySQL: in the Database Wizard, select 
MySQL in the dropdown list instead of JDBC. Click Next. Select 'Connect 
using JDBC' and click Next. For the database name use the name you gave 
the database. For the server, use the one you created with your user 
name. Click Next. Enter your user name in the box and click the 
'Password required' check box. Now if you click the Test Connection 
button, you should get a connection.
      Personally, I have a MySQL server running on my computer. I have 
also downloaded the MySQL Connector 1.0.1 extension and installed it. My 
steps to connect to the MySQL server: I selected MySQL in the bottom 
dropdown list instead of JDBC. For Step #2, I clicked 'Connect 
directly'. For Step #3, I entered the name of the database (schema) that 
I want to access, and 'localhost' as the server. For Step #4: I enter my 
user name and checked 'Password required'. This works for AOO 3.4.1.

--Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org