Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
On 27/02/13 18:04, Heinrich Stoellinger wrote: 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... 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 'OptionsAdvanced' 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!!?? -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
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 On Thu, 28 Feb 2013 11:06:26 +0100, Ian Whitfield whitfi...@telkomsa.net wrote: On 27/02/13 18:04, Heinrich Stoellinger wrote: 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... 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 'OptionsAdvanced' 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!!?? -- Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/ -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
THANKS!! Heinz You *_DID_* come up with the Magic Wand!!! On 28/02/13 12:40, Heinrich Stoellinger wrote: ... (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! -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
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 -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
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. On Thu, 28 Feb 2013 12:25:31 +0100, Ian Whitfield whitfi...@telkomsa.net wrote: THANKS!! Heinz You *_DID_* come up with the Magic Wand!!! On 28/02/13 12:40, Heinrich Stoellinger wrote: ... (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! -- Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/ -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
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: On 02/28/2013 12:25 PM, Ian Whitfield wrote: 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?? 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 -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
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 -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
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 On Wed, 27 Feb 2013 11:49:24 +0100, Ian Whitfield whitfi...@telkomsa.et wrote: 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 -- Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/ -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
Hi All Latest situation ... (it's getting worse) On Alex's recommendation about a possible 'bug' in my latest Libre-Office (PCLOS version), I downloaded 4.0.1 to my test machine directly from the LO Website and gave it a test yesterday. All seemed well and it runs fine and I was able to connect to MySQL through MyAdmin. (I didn't test any further). Today I repeated the exercise on my WorkStation (same OpSys). But I can not now get MyAdmin to start-up at all, I get the error Firefox is unable to connect. And if I try to connect through LO Base it fails at loading the JDBC Driver. These are the steps I have done ... Re-loaded*MyAdmin*- Database Manager. (*'**phpMyAdmin**'*through Synaptic).* *(Not sure about MySQL Connector.-***'**mysql-connector-java-5.1.22'.* How do I check for this?If I look for it it tells me that it is in Java Archive)* *Re-loaded*//mysqli Extension *via Synaptic **Checked*my.cnf*file in /etc and comment out the line “skip networking” by putting a # at the front of it. **STOPPED the MySQL Server in PCC and reset the MySQL root password. 1. Start the mysqld configuration *as SU*. mysqld --skip-grant-tables 2. Login to MySQL as root. mysql -u root mysql 3. Replace YOURNEWPASSWORD with your new password! UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit; Re-started *MyAdmin* in the PCC. **Started*MyAdmin* as 'root' with new password. That's when I get the failed to connect error. Any thoughts please. IanW Pretoria RSA -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
Le 23/02/2013 11:56, Ian Whitfield a écrit : Hi Ian, I have accepted what has happened and am busy re-building my DB from scratch! IMHO it is still WRONG to store Data in an area that gets overwritten every time you do a upgrade or re-install. In over 30 years Usually, an simple upgrade of mysql will not overwrite your tables. Sometimes, it will create a new data directory, and keep your previous data in an old/renamed directory (e.g. migrated, or old, or even tagged with the previous version number) - this is what happens on OSX, for example. However, what happens exactly is very dependent on the Linux distribution's version of mysql that they happen to have modified to suit their system. Each distro tends to do its own thing, which can be immensely frustrating. Debian based distros like Ubuntu/Mint and consorts tend to use debconf, with which, personally, I still have rather a hard time. PCLinuxOS used to be Mandrake based, but I'm not so sure now. I imagine that RedHat and Suse have yet another mechanism for auto-configuring the setup and migration of mysql data when upgrading versions. So, as usual with many things Linux, YMMV, which as a casual user can be a right, royal PITA. If, however, you do a fresh install of your operating system, well, then, I would say that it is to be expected that your data on the root drive gets wiped. There are various ways to mitigate this, including having separate partitions for /(root), /usr (for most graphical applications and their basic configuration data), /var (for stuff like mailserver and database data) and /home (for users' data and configuration files), but most distributions do not offer that in the simplified installation routine, where everything tends to get installed into a single /(root) partition. If you keep things separate as indicated above, you can even re-install your OS (up to a certain extent, at least) without trashing your /home or other sensitive or important data areas. Anyway, enough of the preaching, you live and learn as they say, I know I certainly did, but it did involve frequent hair pulling at times !! Alex -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: 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 EditPaste. 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 -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
Le 24/02/2013 14:05, Ian Whitfield a écrit : 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 EditPaste. 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 -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
On 24/02/13 15:21, Alex Thurgood wrote: 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. 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 -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
On 02/24/2013 04:05 PM, Ian Whitfield wrote: 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 -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
On 02/24/2013 04:05 PM, Ian Whitfield wrote: Is there another way to input the CSV data if it is a bug?? http://www.softwareprojects.com/resources/programming/t-how-to-use-mysql-fast-load-data-for-updates-1753.html -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
Hi Gavin and Heinz, On 21/02/13 21:16, Girvin R. Herr wrote: Ian, Which version of MySQL are you using? *MySQL 5.1.55 PCLOS 2011* Heinz asked about 'SHOW GRANTS' Well I'm in a real hole here!!! This morning I decided to go back to basics and re-installed all the MySQL packages (in case) I now have the situation that I can not CREATE USER so am unable to set any GRANTS!! When I try I get the error message ERROR 1396 (HY000): Operation CREATE USER failed for 'ianw'@'localhost' BUT, MORE SERIOUS - I think I have fallen in a really big hole!! What I did before I re-installed my OpSys was to back-up 'home' completely to an external drive. Then when I re-installed I set it NOT to over-write or use the 'home' partition and thus I maintained all my data on the drive. (or so I thought!!) BUT - Now digging around on Google I see that (I think) MySQL does not keep its data in 'home' but rather in '/ver/lib'. There is such a folder on my system but I can not get into it even as SU. So is this correct?? Have I now lost my Database?? As I did not back-up the root at all If this is so I think it is very poor practice to store data outside the 'home' partition Meanwhile phpMyAdmin will not work for me at all even after a re-install - so as I said I'm in a real hole!! IF I have lost the Database is there a way to make it save it in the 'home' directory in future?? Thanks for the help IanW Pretoria RSA -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
Le 22/02/2013 10:53, Ian Whitfield a écrit : Ian, Well I'm in a real hole here!!! This morning I decided to go back to basics and re-installed all the MySQL packages (in case) Seriously, that was an unnecessary, and potentially, bad move. I have no idea how PCLinuxOS packages mysql server and its dependencies, so maybe you did indeed overwrite everything. I now have the situation that I can not CREATE USER so am unable to set any GRANTS!! When I try I get the error message ERROR 1396 (HY000): Operation CREATE USER failed for 'ianw'@'localhost' Yep, sounds like you have overwritten the permissions table. So is this correct?? Have I now lost my Database?? As I did not back-up the root at all Yes, the mysql data is stored in /var/lib/mysql/data, or sometimes in /var/mysql/data, it DEPENDS on the particular distrib as to where it finally gets put, but usually it is somewhere in a sub-directory of /var. It has been like this for as long as I can remember, and if you had read the mysql manuals like it has been suggested in the past you would know this. If this is so I think it is very poor practice to store data outside the 'home' partition No, it is perfectly reasonable, given that Mysql is a server daemon. Many well behaved Linux daemons (e.g. postfix, mail, printer spool, etc) tend to store their persistent data in /var, their configuration data in /etc, and so on, nothing new there. You can also manually configure the data directory by editing the configuration files, providing you give the mysql server process the appropriate rights, but I think we are a long way from there at the moment. Meanwhile phpMyAdmin will not work for me at all even after a re-install - so as I said I'm in a real hole!! IF I have lost the Database is there a way to make it save it in the 'home' directory in future?? Yes, change the directory in your mysql configuration files. Please read the fine manual before doing this, as changing the config files without knowing what, or being sure of what, you are doing, can make even your current situation worse. Again, reading the official manual really helps one come to terms with how everything fits together. Also, because distribs all tend to do their own thing, read the documentation associated with your Linux distrib's version of mysql. Note that the folder name is /var/lib and not /ver/lib. And yes, you generally require root privileges to be able to read the data in this directory. Alternatively, you can pop in a Live Distro CD/DVD and use that to look through your file system, without having to be root. I apologise for sounding imperious, but there really is no substitute for reading the manuals, or at least a decent mysql administrator's book, when it comes to mysql (or any other database server, for that matter). Alex -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
Alex Thurgood wrote: Le 22/02/2013 10:53, Ian Whitfield a écrit : Ian, Well I'm in a real hole here!!! This morning I decided to go back to basics and re-installed all the MySQL packages (in case) Seriously, that was an unnecessary, and potentially, bad move. I have no idea how PCLinuxOS packages mysql server and its dependencies, so maybe you did indeed overwrite everything. I now have the situation that I can not CREATE USER so am unable to set any GRANTS!! When I try I get the error message ERROR 1396 (HY000): Operation CREATE USER failed for 'ianw'@'localhost' Yep, sounds like you have overwritten the permissions table. So is this correct?? Have I now lost my Database?? As I did not back-up the root at all Yes, the mysql data is stored in /var/lib/mysql/data, or sometimes in /var/mysql/data, it DEPENDS on the particular distrib as to where it finally gets put, but usually it is somewhere in a sub-directory of /var. It has been like this for as long as I can remember, and if you had read the mysql manuals like it has been suggested in the past you would know this. If this is so I think it is very poor practice to store data outside the 'home' partition No, it is perfectly reasonable, given that Mysql is a server daemon. Many well behaved Linux daemons (e.g. postfix, mail, printer spool, etc) tend to store their persistent data in /var, their configuration data in /etc, and so on, nothing new there. You can also manually configure the data directory by editing the configuration files, providing you give the mysql server process the appropriate rights, but I think we are a long way from there at the moment. Meanwhile phpMyAdmin will not work for me at all even after a re-install - so as I said I'm in a real hole!! IF I have lost the Database is there a way to make it save it in the 'home' directory in future?? Yes, change the directory in your mysql configuration files. Please read the fine manual before doing this, as changing the config files without knowing what, or being sure of what, you are doing, can make even your current situation worse. Again, reading the official manual really helps one come to terms with how everything fits together. Also, because distribs all tend to do their own thing, read the documentation associated with your Linux distrib's version of mysql. Note that the folder name is /var/lib and not /ver/lib. And yes, you generally require root privileges to be able to read the data in this directory. Alternatively, you can pop in a Live Distro CD/DVD and use that to look through your file system, without having to be root. I apologise for sounding imperious, but there really is no substitute for reading the manuals, or at least a decent mysql administrator's book, when it comes to mysql (or any other database server, for that matter). Alex Ian, Yes, you can do it, but just because you can, doesn't make it right. Storing the database in /home is a _very bad idea_! /home is the least secure location, where, as you found out, the current location in /var/lib won't even allow SU to get into it, but I think that is because you have not configured MySQL correctly yet. You need to go back and follow the initial MySQL setup procedure again, as you did in the past. You did write it down, didn't you? This is also a good example of the consequences of not backing up properly. In a past thread of yours, I am sure I mentioned the use of mysqldump, which creates a human-readable SQL backup of your database. If you had done that regularly, you would have a backup to re-create (restore) your database using the mysql program. Without that backup, I am afraid it looks like you are out of luck. With mysqldump, you can specify where the backup file goes, even /home, if you don't care about security. We learn by experience. Make a backup script, as I have, and run it at least monthly to make the backups easy. _Always_ run that backup before you do any messing with system software updates. I am not sure if Base does this, but some database clients (Rekall, for example) use the database to store the table, form, and report definitions. If that is so with Base, then you may have lost all the work you have done in Base also. Sorry for the bad news. Girvin Herr -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
Hi Alex Thanks for your reply. (Sorry about the delay but for some reason yesterday I got no eMails in from the LO Forum???!!!) On 20/02/13 20:44, Alexander Thurgood wrote: 1) Is your mysql server even running ?* YES* From the console/command line, try typing : ps aux | grep mysql [ian@localhost ~]$ ps aux | grep mysql root 2946 0.0 0.0 4260 1476 ?S10:17 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --mysqld=mysqld --pid-file=/var/run/mysqld/mysqld.pid mysql 3071 0.0 1.1 124144 23072 ?Sl 10:17 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/localhost.localdomain.err --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock --port=3306 ian 3537 0.0 1.8 198500 37676 ?Sl 10:17 0:00 /usr/sbin/mysqld --defaults-file=/home/ian/.local/share/akonadi/mysql.conf --datadir=/home/ian/.local/share/akonadi/db_data/ --socket=/home/ian/.local/share/akonadi/socket-localhost.localdomain/mysql.socket ian 4805 0.0 0.0 4312 776 pts/1S+ 10:28 0:00 grep --color mysql 2) Now, from the same command line, try typing : mysql -p and enter the password for the current user. If your user didn't need a password, remove the -p Post the response here. [ian@localhost ~]$ mysql -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 3)From the same command line, try typing : mysqladmin -p extended-status This should give a whole list of details about the running mysql server (if indeed it is running). Again, the -p parameter is only necessary if the user connecting to the mysql server requires a password to do so. If not, you don't need the -p parameter. I get the whole list of details as you mention. What I think the problem is - is that I now have a new installation of MySQL and thus it does not yet have any users or passwords set-up in it. So what I tried was... mysql CREATE USER 'ianw'@'localhost' IDENTIFIED BY 'pwd'; Query OK, 0 rows affected (0.00 sec) mysql GRANT ALL ON db1.* TO 'ianw'@'localhost'; Query OK, 0 rows affected (0.00 sec) But when I try to get into MyAdmin with this user and pwd I get #1045 Cannot log in to the MySQL server I'm stumped? Thanks for the help - appreciated IanW Pretoria RSA -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
Le 21/02/2013 09:57, Ian Whitfield a écrit : Hi Ian, mysql CREATE USER 'ianw'@'localhost' IDENTIFIED BY 'pwd'; Query OK, 0 rows affected (0.00 sec) mysql GRANT ALL ON db1.* TO 'ianw'@'localhost'; Query OK, 0 rows affected (0.00 sec) But when I try to get into MyAdmin with this user and pwd I get #1045 Cannot log in to the MySQL server I'm stumped? Forget phpmyadmin (what PCLinuxOS seems to call MyAdmin, don't understand why they renamed it and be the only distrib to do so ?) for the moment. From the console/command line, try to connect as the user ian that you just created : mysql -u ianw -p Can you connect to mysql as user ianw from the command line ? Alex -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
On 21/02/13 13:21, Alex Thurgood wrote: From the console/command line, try to connect as the user ian that you just created : mysql -u ianw -p Can you connect to mysql as user ianw from the command line ? Yes Alex I can!! [ian@localhost ~]$ mysql -u ianw -p Enter password: Welcome to the MySQL monitor. mysql IanW Pretoria RSA -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
On 21/02/13 13:21, Alex Thurgood wrote: From the console/command line, try to connect as the user ian that you just created : mysql -u ianw -p Can you connect to mysql as user ianw from the command line ? Yes Alex I can!! [ian@localhost ~]$ mysql -u ianw -p Enter password: Welcome to the MySQL monitor. mysql IanW Pretoria RSA -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
Le 21/02/2013 12:57, Ian Whitfield a écrit : [ian@localhost ~]$ mysql -u ianw -p Enter password: Welcome to the MySQL monitor. This means that you should also be able to connect from LO. Looks like your PHP and phmyadmin installation are screwed, can't help you there I'm afraid, but you don't need that to connect to your databases from LO. Alex -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
Ian, Which version of MySQL are you using? Girvin Herr Ian Whitfield wrote: On 21/02/13 13:21, Alex Thurgood wrote: From the console/command line, try to connect as the user ian that you just created : mysql -u ianw -p Can you connect to mysql as user ianw from the command line ? Yes Alex I can!! [ian@localhost ~]$ mysql -u ianw -p Enter password: Welcome to the MySQL monitor. mysql IanW Pretoria RSA -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Re-Connecting LO Base to an SQL DB
Le 20/02/13 11:52, Ian Whitfield a écrit : Hi Ian, MySQL is part of the new installation and I have set it to 'Start on Boot'. I re-installed MyAdmin via Synaptic I should have the Connector in the installation. I edited out the skip networking line in /etc/my.cnf Now if I try to run MyAdmin I get the error ... ///The mysqli extension is missing. Please check your PHP configuration. a href=Documentation.html#faqmysql target=documentationimg src=themes/dot.gif title=Documentation alt=Documentation class=icon ic_b_help //a/ 1) Is your mysql server even running ? From the console/command line, try typing : ps aux | grep mysql This should return at least a line containing mysqld and mysql.sock indicating that the server is up and running. 2) Now, from the same command line, try typing : mysql -p and enter the password for the current user. If your user didn't need a password, remove the -p Post the response here. 3)From the same command line, try typing : mysqladmin -p extended-status This should give a whole list of details about the running mysql server (if indeed it is running). Again, the -p parameter is only necessary if the user connecting to the mysql server requires a password to do so. If not, you don't need the -p parameter. Really, you should be asking these questions on the PCLinux forums, these are not LO questions. Alex -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted