Wednesday, September 03, 2008

Adobe Acrobat: "Could not initialize Organizer database."

There is an imbedded MySQL server that runs the Organizer. To check which configuration files it's attempting to load, run the following at Terminal:

"/Applications/Adobe Acrobat 8 Professional/Adobe Acrobat Professional.app/Contents/MacOS/mysqld" --no-defaults --verbose --help

What it shows for me is:

Default options are read from the following files in the given order: /etc/my.cnf /usr/local/mysql/data/my.cnf ~/.my.cnf

If you run your own MySQL server, an Apple installed MySQL server, and/or if any of these files just happen to exist on your system, it could be conflicting with the embedded Adobe MySQL server. On my system, I run MySQL to do local web development against and I use /etc/my.cnf as my configuration file, setting all sorts of options that the embedded Adobe MySQL chokes on or wasn't compiled to provide (InnoDB for example).

SO... what I did (your milage may vary) is rename the embedded mysqld and mysqladmin to mysqld.old and mysqladmin.old and then create the following script as both mysqld and mysqladmin in their stead:

#!/bin/sh "$0.old" --no-defaults "$@"

This executes mysqld.old and mysqladmin.old with the additional flag --no-defaults ignoring any configuration files that happen to be on your system and use only the compiled in defaults.

It would appear to me to be a gross oversight on the part of Adobe to have the embedded mysqld read a global options file or any options file other than one it supplies OR it should be passing in --no-defaults when invoking the embedded server instance.

For those curious, the command line options getting passed to mysqld are:

--skip-networking --socket=/Users/[your name here]/Library/Caches/Acrobat/8.0_ppc/Organizer70 --skip-grant-tables --skip-innodb --myisam-recover --lower_case_table_names=1 --tmpdir=/Users/[your name here]/Library/Caches/Acrobat/8.0_ ppc/ --datadir=/Users/[your name here]/Library/Acrobat User Data/8.0_ppc/ --language=/Applications/Adobe Acrobat 8 Professional/Adobe Acrobat Professional.app/Contents/MacOS/

Command line options being passed to mysqladmin (when you shut down Acrobat) are:

--socket=/Users/[your name here]/Library/Caches/Acrobat /8.0_ppc/Organizer70 shutdown

UPDATE:

I've been asked for help getting this to work by those not familiar with the command line. Here's the step by step which should work for most people (first shut down Acrobat):

sudo -s

cd "/Applications/Adobe Acrobat 8 Professional/Adobe Acrobat Professional.app/Contents/MacOS/"

mv mysqld mysqld.old
echo '#!/bin/sh "$0.old" --no-defaults "$@"' > mysqld
chmod +x mysqld

mv mysqladmin mysqladmin.old
echo '#!/bin/sh "$0.old" --no-defaults "$@"' > mysqladmin
chmod +x mysqladmin