2011 note: Given that this document is now about a decade old, with reasonable luck it should no longer be needed for LibreOffice, the 2010 successor to OpenOffice.org following a code fork. However, I am retaining this page with the rest of my LibreOffice documentation in case it is still needed, and for historical interest.

Addendum to mysql.{html|pdf} for Debian


You will need to install Debian package unixodbc, and then package libmyodbc. Say "yes" during the latter's installation, to verify that you want to register MySQL with the UnixODBC driver. This will populate /etc/odbcinst.ini .

[MySQL]
Description = MySQL driver
Driver = /usr/lib/odbc/libmyodbc.so
Setup = /usr/lib/odbc/libodbcmyS.so
CPTimeout =
CPReuse =
FileUsage = 1

You will still need to populate /etc/odbc.ini as described, with access details for your MySQL database, e.g.,

[MySQL]
Description = MySQL database
Driver = MySQL
Server = host.example.com
Database = test
Port = 3306
Socket =
Option =
Stmt =


If your testing using "isql" fails, and the database lives on a different host machine, then make sure that you've opened up access to Debian's MySQL package on all the required levels:

o In /etc/mysql/my.cnf, comment out the line "skip-networking" to enable network access to MySQL generally (by default, on port 3306/tcp). Be aware of the degree to which this increases your security exposure. Restart MySQL, to put this change into effect.
o In /etc/hosts.allow, you may (probably will) need a line for the MySQL service, enabling access from the IP networks you specify. This step is necessitated by the fact that Debian's MySQL binary is compiled with dynamic dependency on libwrap (the TCP Wrappers library).
o Any IP-filtering ("firewalling") script you have in place.
o Any necessary rows in the MySQL "users" table, to permit access from specific hosts. You may have to do this afterwards:
# mysqladmin -u root -p flush-privileges


You will need to create symlink /usr/lib/libodbc.so, pointing to the /usr/lib/libodbc.so.1.* binary. (On my Debian-sarge system as of 2002/11, there's symlink libodbc.so.1 pointing to libodbc.so.1.0.0, but symlink libodbc.so did not get created.)