Re-Connecting LO Base to an SQL DB

Thanks Alex and Girvin - Very much appreciated!!

Girvin - Thanks for all your kind comments and suggestions!! I WILL do something like this once I have everything sorted out. I like your idea of a spare drive and I do have a couple of "Drive Bays" here although I also have two external USB Hard Drives so I think either would do.

I particularly like that you sent me your script for back-up. Thanks a lot for that!! I had already given 'MySQL Dump" a quick look and marked it for further investigation once I'm finished. I do however have a couple of problems with "Back-up Programs", and this comes from years of trying to use them!! Mostly they seem to have a very bad trate of failing on Restore!! I also don't like the way they "compress" the data so that you can not use it directly. One of the reasons I like a 'Mirror Drive" way of doing things. Always usable and no compression - de-compression to go wrong!!

Alex - I note and see your comments on the way different versions of software may or may not work and the way different distros work. With PCLOS you can select if you want to format the Drive or Partition where the new OpSys is going. I have always felt it was better to do this to get a proper "clean install". So naturally if there is any data there that will be lost. I STILL think it is wrong to put data there and that's what caught me out as I NEVER expected it to be there. Adding separate Folders I feel would complicate the Path structure and still does not get round a system format. I think Girvin is on the right track here!!

OK Guys - thanks once again... As you say "You learn as you go along"!!

Right now however I have hit another brick wall!!!

Last time when I did this I had no problem importing CSV data but this time I can not get it to work!!!??

I had the old CSV file I used before and open this with Calc. I then spent yesterday "cleaning it up" and then decided to import it. I can't remember which way I did it last time so did a quick Google...

As per the WebSite I opened my already prepared DB Table and tried the instruction to "Drag the Calc Sheet from Calc to the open DB Table". All I get is a red circle with a line through it which I interpolate as meaning "Not Allowed".

So I went the other way and from both Calc and directly from the CSV file I Selected All, Copied this and then went to the Base Table and selected Edit>Paste. Absolutely nothing happens - not even an error message!!!!

What am I doing wrong or what have I missed?? I've checked all the Column Names match the DB Field Names exactly and the order of them both is the same.

I'm afraid I' stumped again.

Thanks Guys.

IanW
Pretoria RSA

Hi Ian,

As per the WebSite I opened my already prepared DB Table and tried the
instruction to "Drag the Calc Sheet from Calc to the open DB Table". All
I get is a red circle with a line through it which I interpolate as
meaning "Not Allowed".

So I went the other way and from both Calc and directly from the CSV
file I Selected All, Copied this and then went to the Base Table and
selected Edit>Paste. Absolutely nothing happens - not even an error
message!!!!

What am I doing wrong or what have I missed?? I've checked all the
Column Names match the DB Field Names exactly and the order of them both
is the same.

Which version of LO are you using, in particular, are you using the PCLinuxOS version of LO, or one from the official LO download page ?

It might be a bug in that version.

Alex

You could be right Alex!! I KNOW one of these two ways worked for me last time!!
Is there another way to input the CSV data if it is a bug??

I'm using PClinuxOS 2013.02 with LO 3.6.5.2 (Build ID: 5b93205) from the PCLOS Depository (via Synaptic).

IanW
Pretoria RSA

Hi Ian,

You could be right Alex!! I KNOW one of these two ways worked for me
last time!!
Is there another way to input the CSV data if it is a bug??

http://dev.mysql.com/doc/refman/5.1/en/load-data.html

Alex

http://www.softwareprojects.com/resources/programming/t-how-to-use-mysql-fast-load-data-for-updates-1753.html

Hi All

I have two Machines here both running the new PClinuxOS 2013.02 and LO 1.4.0

Previously I was on PCLOS 2012.07 and LO 1.3.6 and had a MySQL Database running fine.

I now can get neither machine to set-up a Database!!

The one fails to start httpd with the error - /
"//Starting:httpd:apr_sockaddr_info_get() failed for local host.localdomain.//
//httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for Server [FAILED]//"/
And will not even start MyAdmin.

And on both machines I can not find the Connector which I need - "mysql-connector-java-5.1.22" on the system
_*OR*_ see it in the Repos to be able to install it as I did before.
Has this Connector changed and if so what must I now use?

Thanks for any help

IanW
Pretoria RSA

Hello Ian,
Regarding the JDBC-connector:
download it from the MySQL homepage, un-tar it, then under LO go into
Options -> Extended ("Erweitert" in the German version). There you add
a Java Runtime Environment and also specify the directory into which you
put the .jar-file of the connector in the class path...
Regards
Heinz

Thanks Heinz

I got the Connector from MySQL Downloads and did what you suggest, un-tarred it into a Folder called /home/SOFTWARE. Went to the Java settings in LO and added this path to Class Path.
(BTW the 1.4.0 setting is at 'Options>Advanced' now).

I then re-started and re-booted the system and went to LO Base -
Select Connect to existing DB
Pick 'MySQL'
Connect using JDBC
Enter DB Name
Server localhost
Port 3306
Driver class comes up as 'com.mysql.jdbc.Driver so Test Class.

ERROR - "The JDBC driver could not be loaded"

This is on my Test machine - My Work machine will not even load MyAdmin still and I can't crack that one either!! I wonder if something has changed in the new PCLOS or in LO???

Once again I'm stuck again - any thoughts!!??

Hello Ian,
I am at loss wondering what is still wrong in your case. You have obviously
added the Java Runtime Environment in LO (I specified the Oracle 1.7.0_03 version),
as well as added the jar-file of the connector under "Class Path" (the jar-file is
selected under "add archives"). For the server I actually specified the host name
(not localhost) because I access the DB also from a client across a LAN.
As I said before, I don't use MyAdmin but only the command-line client (mysql),
so I cannot be of any help there...
Sorry in any case for not coming up with the "magic wand"....
Regards
Heinz

THANKS!! Heinz

You *_DID_* come up with the "Magic Wand"!!!

....... (the jar-file is selected under "add archives").

That is where I had gone wrong. I had added it under "Folders"!!!

So now I'm into the DB on one machine at least. Next to test if I can import CSV data.......... (??)

On the other problem - When I re-installed httpd, which I understand I need, I get the error ...
"Warning: network-up is needed by httpd in runlevel 4"

Any idea what this means and how I get round this??

Thanks for great help again!!!!!!!!!

It means that the apache server is expecting the network interface(s) to
be already up and running (with a correct local or IP address) when the
httpd service starts. Apparently, that isn't the case with your latest
PCLinuxOS version, or else it may come from a race condition caused by
the parallelised boot process of init.d scripts. In other words, you
will have to find a way to ensure that either the httpd daemon is
started after your network interface(s) is/are brought up, or else make
sure that your network interface(s) are running very early on in the
boot process. This is a problem with PCLinuxOS and has absolutely
nothing to do with LibreOffice, or Java, or MySQL.

Potentially, your network interface(s) are not being brought up in time
during boot because the networking script is set to obtain a DHCP
address and this action is not completed when the httpd daemon is
started (for whatever reason, that might be, e.g. DNS or hostname
resolution problems, dhcpclient bugs, timeouts with the DHCP server,
wrong or conflicting static IP address attribution, etc - on other
words, a whole host of potential problems totally unrelated to LO, mysql
or java). I have a similar problem on one of my Linux Mint machines
(fortunately not running an apache server, but a PITA nonetheless),
which is linked to the network card not being initialised (internal
memory buffers being systematically cleared or some such other
trickery), on boot. I am often forced to reinitialise the network
interfaces by hand in order to obtain an address from my dhcp server (my
ADSL router), as it turns out.

Before even attempting to fiddle with any of that, go and ask on the
PCLinuxOS forums whether this is a known problem.

Alex

Thanks Alex

I appreciate the pointers!!

I was _*NOT*_ trying to say that there was a problem with LO, Java or MySQL - I just asked as anyone using this combination might have come across a similar problem and could point me in the right direction - as you have done.

I will post to the PCLOS Forum and see what answers I get.

Regarding my problem with importing CSV Data to my Database I can still _NOT_ get the LO Calc to LO Base import to work. It complains about text being too long and even if I remove the record it points to I still get the same error!!

So I gave up on that, (although I'm sure that is what I used before with the same csv data!!) and did some Googling.....

I came across a program called 'Navicat', a GUI Import program, downloaded it and gave it a try.

It worked beautifully first time - I can strongly recommend it!!! (You get a 30-day free trial of it and it runs in Wine)

Thanks for the help.

IanW
Pretoria RSA

Hello again,
Importing CSV-files should be easy enough! Just open a .csv-file under Calc,
select the right separator (, ; : tab or whatever). The csv-file is then
opened as a spreadsheet. You can then work with it as usual and save it as an
LO-spreadsheet file, or a M$-xls-file etc...
Regarding the network problem: I suppose something "networky" doesn't come up at boot-time.
Maybe you should look at the early stages of /var/syslog or /var/dmesg (e.g. cat /var/syslog
or "more" or "tail" /var/yslog...) for any hints.

Ian,
Just a note: Why do you think you need httpd? Unless you are running a web server (http://www…) on your computer, you should not need httpd installed! I am not running a web server, do not have httpd running, and the computer runs fine without it.
Girvin Herr

Alex Thurgood wrote:

Hi Girvin,

Just a note: Why do you think you need httpd? Unless you are running a
web server (http://www…) on your computer, you should not need httpd
installed! I am not running a web server, do not have httpd running,
and the computer runs fine without it.
Girvin Herr

Apparently because Ian wants to use phpmyadmin (which is called
"MyAdmin" ?? under PCLinuxOS) in order to administrate his mysql server
using a GUI (web-based, but GUI nonetheless). Hence the requirement for
a working Apache server and PHP setup.

There are other GUI tools available today that do just as good a job
without the requirement for a web server.

Alex

Alexander Thurgood wrote:

Hi Girvin,

Just a note: Why do you think you need httpd? Unless you are running a
web server (http://www…) on your computer, you should not need httpd
installed! I am not running a web server, do not have httpd running,
and the computer runs fine without it.
Girvin Herr

Apparently because Ian wants to use phpmyadmin (which is called
"MyAdmin" ?? under PCLinuxOS) in order to administrate his mysql server
using a GUI (web-based, but GUI nonetheless). Hence the requirement for
a working Apache server and PHP setup.

There are other GUI tools available today that do just as good a job
without the requirement for a web server.

Alex
  

Alex,
I agree. I use mysql when I need it.
In fact, my Slackware distro does not have myadmin, but it does have something called mysqladmin, which does not look like it needs php.
Thanks for the explanation.
Girvin