Business Objects on Linux – MySQL Tweak

My new twitterverse pal Greg Myers was giving the first part of this series a go on Oracle Enterprise Linux yet still demanding support. I tell ya…users! Just kidding, Greg. Anyway, he came up with an interesting problem. First off, the XI 3.1 installer for Linux didn’t seem to like the reference to localhost on the screen where the MySQL parameter for hostname was supplied. I think we decided that this was because of his hosts file. But that isn’t the point of this post. He actually installed MySQL stand alone to see if he could work around this issue and it didn’t work either. The great news is he was already well on his way to the solution when we caught up. Read on…

With MySQL 5.x installed via the package manager, the installer started throwing a different error:

MySQL ” environment variable not set. This means either that a MySQL client is not installed on this computer, or that a MySQL client is installed on this computer but not set up for the current user. (STU00112)

Interesting. Here are the steps we took to debug and ultimately solve this.

  • Run ps -ef | grep mysql to ensure the MySQL daemon is running.
  • In a new MySQL install, you have to get things rolling by resetting the MySQL root password. You can then keep it simple for our test environment here and use your root MySQL database. This is clearly NOT recommended in a live environment. To do so, execute the following command as root:
mysqladmin -u root password NEWPASSWORD
  • Test a connection to the environment with this newly established root user. If you connect and end up inside the MySQL client, you can conclude that MySQL is running successfully and you can connect to it. Still as root to keep it simple:
mysql -u root -h your_hostname -p
  • With MySQL running, it was confirmed that the XI installer was looking for a MySQL environment variable. In particular, $MYSQL_HOME. The environment variable $MYSQL_HOME wants to know where the my.cnf file lives. Generally speaking, this can be found in the /etc folder. Search your system for a precise location. A few keystrokes as root or a sudoer and you’re there:
MYSQL_HOME=/etc export MYSQL_HOME echo $MYSQL_HOME

With that, restart the install.sh script. Remember, to make this environment variable stick, you need to put it in the .profile of the XI runtime user or set it as a system wide environment variable. You should find that it’ll now run through to completion.

Thanks Greg, for a good challenge.

Leave a Reply