Configuring MySQL using ODBC and Mac App Store versions of NeoOffice

From NeoWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 05:31, 20 May 2014 (edit)
Sardisson (Talk | contribs)
(link to dbase article, since the NeoSE changes for dBase are limited)
← Previous diff
Revision as of 23:03, 27 May 2014 (edit) (undo)
( | contribs)
(Remove warnings about using ODBC now that 64 bit bugs have been fixed)
Next diff →
Line 1: Line 1:
-{{handbook sidebar|DatabaseTOC}} {{fixme}}+While NeoOffice 2013 and higher - also known as NeoOffice Secure Edition - cannot use JDBC drivers, NeoOffice Secure Edition can connect to MySQL servers using ODBC.
-The security restrictions of Apple’s “App Sandbox” place many limitations on applications available from the Mac App Store, including NeoOffice Secure Edition (NeoOffice 2013 and 2014). This particularly affects NeoOffice’s [[NeoBase|Base]] component. {{alertbox2|If you do a significant amount of work with databases, the NeoOffice developers recommend that you use [http://www.openoffice.org/ Apache OpenOffice] with the [http://extensions.openoffice.org/en/project/oracle-report-builder Oracle Report Builder extension] instead.}}+Please note that you must use the steps listed below to use MySQL's ODBC driver in NeoOffice Secure Edition. These special steps are necesary because NeoOffice Secure Edition is sold in Apple's Mac App Store and applications in Apple's Mac App Store must implement several security requirements. Unfortunately, Apple's security requirements make MySQL's default ODBC driver installation inaccessible to NeoOffice Secure Edition.
-{{alertbox2|If you wish to continue using NeoOffice 2013/2014 for database work, the NeoOffice developers [https://trinity.neooffice.org/modules.php%3fname%3dForums%26file%3dviewtopic%26p%3d64779%2364779 recommend]<!-- sucks to have to encode all those characters for this to work :P --> using a [[Working_with_dBase_databases|dBase]] database instead, because Base experiences a number of bugs when using MySQL’s OBDC drivers.}}+{{alertbox2|If you do a significant amount of work with databases, the NeoOffice developers recommend that you use [http://www.openoffice.org/ Apache OpenOffice] with the [http://extensions.openoffice.org/en/project/oracle-report-builder Oracle Report Builder extension] instead.}}
-{{alertbox2|However, if you wish to proceed with MySQL in spite of these warnings, you can use the following steps to connect to a MySQL database via OBDC.}}+#Download the .tar.gz for MySQL's ODBC driver (32 bit for NeoOffice 2013 and 64 bit for NeoOffice 2014 and higher). The .tar.gz must be used because the .dmg installer will not work with applications that run in Apple's App Sandbox.
 +#Double-click on the downloaded .tar.gz file to unpack it. That should create a folder with name starting with "mysql-connector-odbc". Move that folder to your <tt>~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data</tt> folder (note: "~" means your Home folder).
 +#If your DSN definitions are in the <tt>/Library/ODBC</tt> folder or <tt>~/Library/ODBC</tt> folder, copy the applicable folder into your <tt>~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/Library</tt> folder.
 +#Open the <tt>~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/Library/ODBC/odbc.ini</tt> file that you created in the previous step in a text editor and replace any occurrences of "localhost" with "127.0.0.1". Using "localhost" will cause the MySQL ODBC driver to use the <tt>/tmp/mysql.sock</tt> file to connect to the database and that file is not accessible to applications running in Apple's App Sandbox.
 +#Open the <tt>~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/Library/ODBC/odbcinst.ini</tt> file that you created in a text editor and replace any occurrences of "/usr/local/lib" with "/Users/<username>/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/<mysql>". Note: replace "<username>" with your Mac user account name and "<mysql>" with the name of the folder that you moved in step 2 above.
-#Download the .tar.gz for MySQL's ODBC driver (32 bit for NeoOffice 2013 and 64 bit for NeoOffice 2014). The .dmg driver will not work with applications that run in Apple's App Sandbox.+If you did the above correctly and your MySQL server is running, you should be able to connect to the MySQL server from Base in NeoOffice Secure Edition.
-#Double-click on the downloaded .tar.gz file to unpack it. That should create a folder with name starting with "mysql-connector-odbc". Move that folder to your ~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data folder (note: "~" means your Home folder).+
-#If your DSN definitions are in the ~/Library/ODBC folder, copy that folder into your ~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/Library folder.+
-#Open the ~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/Library/ODBC/odbc.ini that you created in a text editor and replace any occurrences of "localhost" with "127.0.0.1". Using "localhost" will cause the MySQL ODBC driver to use the /tmp/mysql.sock file to connect to the database and that file is not accessible to applications running in Apple's App Sandbox.+
-#Open the ~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/Library/ODBC/odbcinst.ini that you created in a text editor and replace any occurrences of "/usr/local/lib" with " /Users/<your>/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/<mysql>". Note: replace "<your>" with your Mac user account name and "<mysql>" with the name of the folder that you moved in step 2 above.+
- +
-If you did the above correctly and your MySQL server is running, you should be able to connect to the MySQL server from BASE in NeoOffice 2013 or 2014. Note, however, that when you create a new .odb file that connects to your MySQL server, Base will not display any existing tables but you can query such tables using SQL. This is one of the problems that caused me to recommend using a dBASE database if you were using an HSQLDB database in NeoOffice 3.x or OpenOffice. +
==References== ==References==

Revision as of 23:03, 27 May 2014

While NeoOffice 2013 and higher - also known as NeoOffice Secure Edition - cannot use JDBC drivers, NeoOffice Secure Edition can connect to MySQL servers using ODBC.

Please note that you must use the steps listed below to use MySQL's ODBC driver in NeoOffice Secure Edition. These special steps are necesary because NeoOffice Secure Edition is sold in Apple's Mac App Store and applications in Apple's Mac App Store must implement several security requirements. Unfortunately, Apple's security requirements make MySQL's default ODBC driver installation inaccessible to NeoOffice Secure Edition.

Warning! (click icon for its license info) If you do a significant amount of work with databases, the NeoOffice developers recommend that you use Apache OpenOffice with the Oracle Report Builder extension instead.
  1. Download the .tar.gz for MySQL's ODBC driver (32 bit for NeoOffice 2013 and 64 bit for NeoOffice 2014 and higher). The .tar.gz must be used because the .dmg installer will not work with applications that run in Apple's App Sandbox.
  2. Double-click on the downloaded .tar.gz file to unpack it. That should create a folder with name starting with "mysql-connector-odbc". Move that folder to your ~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data folder (note: "~" means your Home folder).
  3. If your DSN definitions are in the /Library/ODBC folder or ~/Library/ODBC folder, copy the applicable folder into your ~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/Library folder.
  4. Open the ~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/Library/ODBC/odbc.ini file that you created in the previous step in a text editor and replace any occurrences of "localhost" with "127.0.0.1". Using "localhost" will cause the MySQL ODBC driver to use the /tmp/mysql.sock file to connect to the database and that file is not accessible to applications running in Apple's App Sandbox.
  5. Open the ~/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/Library/ODBC/odbcinst.ini file that you created in a text editor and replace any occurrences of "/usr/local/lib" with "/Users/<username>/Library/Containers/org.neooffice.NeoOfficeSecureEdition/Data/<mysql>". Note: replace "<username>" with your Mac user account name and "<mysql>" with the name of the folder that you moved in step 2 above.

If you did the above correctly and your MySQL server is running, you should be able to connect to the MySQL server from Base in NeoOffice Secure Edition.

References

Personal tools