Le jeudi 07 avril 2005 � 09:19 -0400, SOTL a �crit : Hi,
> The issue is that I have spread sheets which I would like to convert to DBs. > When I do the conversions I am given only the choice of saving in ODBC format > which I am unable to connect to. Personally I would rather save in MySQL > format on my other computer but that is not the choice that converting > spreadsheats provides in this computer. If this save function is not correct > please update my thinking or it has changed as I still have m79 installed. I > am currently downloading m91. > First things first, lets get the connection sorted out before dealing with table conversion. > I downloaded what I thought were the correct ODBC drivers from MySQL. When I > untar these drivers tar does strange things and I DO NOT with the final > results that I have files in the /lib directory and no files in /bin. > > Hopefully some one knows the correct site and location to download the > drivers > from. > > PS. I have OO-1.1 installed on a Mandrake 10.1 system thus I may have the > ODBC > drivers but I know not where to look or what to look for. I have the same system, so the following should be relatively easy : MDK doesn't install unixODBC or the MyODBC drivers by default, so, let's start by installing unixODBC. From a console, and as root, type : urpmi unixODBC If you have your update sources configured correctly (check out http;//plf.zarb.org and the Packages link to get to the EasyURPMi setup). Assuming that all goes well, now you will need to go to the MySQL site and download the RPM for MyODBC, the latest version of which is 3.51.11 (unless they updated it today to a newer one). Navigate from the console as root to the directory where you downloaded this file and type : urpmi name_of_the_downloaded_myodbc_file Now type : ODBCConfig-root You should get a graphical configuration module that will let you declare the MyODBC driver and set up a system DSN. You need to declare the paths to the driver and driver setup library before you can configure the DSN. What this program does is write in a file /etc/odbc.ini and /etc/odbcinst.ini. These files and the entries contained therein can be created by hand, so you don't actually need the graphical configure routine, but I've found that it helps. The driver libraries should be in /usr/lib/ : /usr/lib/libmyodbc3-3.51.11.so for the actual MyODBC driver /usr/lib/libmyodbc3S-3.51.11.so for the driver setup library You should simply call your driver MySQL. I've provided a sample /etc/odbcinst.ini file so you can see what kind of entries it contains. Sample odbcinst.ini file : [MySQL] Description = Driver = /usr/lib/libmyodbc3-3.51.11.so Setup = /usr/lib/libmyodbc3S-3.51.11.so FileUsage = 1 Now that we have defined the driver, we can set up the DSN. Again, you can use ODBCConfig-root or do it by hand by editing the /etc/odbc.ini file. A sample /etc/odbc.ini file is enclosed : [localPI] Description = MySQL Driver = MySQL Server = localhost Database = ipdatabase Port = Socket = Option = Stmt = Note that the driver entry must be written exactly the same as the name of the entry in the odbcinst.ini file. The description can be anything The server can either be localhost or an IP address The database is the name of the database within the mysql server. if the database does not exist, you will not be able to connect to it from OOo, so you need to create it beforehand from with the mysql client (or any other useful tool, such as PHPMyAdmin, Webmin, etc). The port and socket entries are usually not used, but occasionally, Mandrake (and I don't know why) requires you to fill in the path to the mysql.lock file (/var/tmp/mysql.lock). I had to do this with MDK 10.0, but not with 9.2 or 10.1. And that's about it as far as non-OOo configuration goes. The rest is relatively banal. Declare your datasource, choose the MySQL tab, choose the ODBC driver as the preferred driver, choose the DSN from the dropdown menu that appears when you click on the button showing ..., enter a user name and password if necessary, and away you go. Alex --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
