MySQL GUI Install

UPDATE Jan 2, 2006
This document will be obsolete soon. Both Query and Admin GUIs are now in ports-current tree thanks to Peter Stromberg (imported Fri Nov 4 14:01:53 2005 UTC)
If you are following the -current branch in /usr/src, please use the mysql-query-browser and mysql-administrator ports.

This documentation was written against OpenBSD 3.7, untested on 3.8 and all further effort will be directed towards the port in -current. If you want to help, I suggest you get a test machine, install -current (both /usr/src and /usr/ports) and work on that.

<DISCLAIMER> One change I am not sure about; I replaced #define _XOPEN_SOURCE with #define _GNU_SOURCE in two files; otherwise the compiler complains about missing math functions </DISCLAIMER>

Table Of Contents


  1. 900 MB for source builds. Disk spaced used by package installations is not included.
  2. download source code for gtkmm 2.2, libsigc++-1.2.7 and mysql-administrator.
  3. (query browser only) download source code for gtkhtml-3.1 and mysql-query-browser
  4. install package mysql-client-4.0.23 (this installs the server as well)
  5. install package gtk+2-2.4.14.tgz
  6. install package gmake-3.80p0.tgz (for GNU source builds)
  7. install package m4-1.4.tgz (required for libsigc++1.2)
  8. build from source: libsigc++-1.2.7 (required for gtkmm 2.2)
  9. install package pkgconfig-0.15.0.tgz (required for gtkmm 2.2)
  10. build from source: gtkmm 2.2 (can be installed in parellel with gtkmm 1.2)
  11. install package libglade2-2.4.0p0.tgz
  12. install package pcre-4.5.tgz
  13. build from source: gtkhtml 3.1.10 (required for Query Browser; package available in OpenBSD 3.8)



If you plan on connecting to (not building against) a MySQL database < 5.0.3 (which is most of us), you should install 1.0.22a, not 1.1.14.

For user administration (and maybe other features),
mysql-admin 1.1.14 needs to connect to a MySQL 5.0.3 database. mysql-administrator 1.1.14 is sending the SQL query select * from mysql.procs_priv and, when that fails, mysql-admin will give the "Could not retrieve user privilege information." error dialog.

You do not need to build against MySQL 5.0.3; building either version of the administrator will work against MySQL 4.0.23p1.

  1. build mysql-gui-common found inside unpacked directory.
  2. modify ./source/linux/MInstanceInfo.cc
  3. modify ./source/linux/MAServerLogsPanel.cc
  4. (admin-1.0.22a only) execute the following commands
    	mv ./images/icons/png/maintree/16x16_StartStopService.png0000644 ./images/icons/png/maintree/16x16_StartStopService.png
    	mv ./library/tests/test_get_cnf_value/t/common.test.query0000644 ./library/tests/test_get_cnf_value/t/common.test.query
    	mv ./library/tests/test_update_cnf/test_update_cnf.vcproj0000644 ./library/tests/test_update_cnf/test_update_cnf.vcproj
    	mv ./library/tests/test_get_all_cnf_sections/test_priv.sh0000644 ./library/tests/test_get_all_cnf_sections/test_priv.sh
    	mv ./images/icons/png/sections/startup_variables_gray.png0000644 ./images/icons/png/sections/startup_variables_gray.png
    	mv ./images/icons/png/maintree/24x24_StartStopService.png0000644 ./images/icons/png/maintree/24x24_StartStopService.png
    	mv ./res/mac/English.lproj/ServerConnections.nib/info.nib0000644 ./res/mac/English.lproj/ServerConnections.nib/info.nib
    	mv ./res/mac/English.lproj/ServerInformation.nib/info.nib0000644 ./res/mac/English.lproj/ServerInformation.nib/info.nib
    	mv ./res/mac/English.lproj/DataFileEditor.nib/classes.nib0000644 ./res/mac/English.lproj/DataFileEditor.nib/classes.nib
    	mv ./res/mac/English.lproj/HealthGraphEditor.nib/info.nib0000644 ./res/mac/English.lproj/HealthGraphEditor.nib/info.nib
    	mv ./res/mac/English.lproj/ServiceControl.nib/classes.nib0000644 ./res/mac/English.lproj/ServiceControl.nib/classes.nib
    	mv ./source/mac/MySQL\ Administrator.xcode/akojima.pbxuser0000644 ./source/mac/MySQL\ Administrator.xcode/akojima.pbxuser
    	mv ./source/mac/MySQL\ Administrator.xcode/project.pbxproj0000644 ./source/mac/MySQL\ Administrator.xcode/project.pbxproj
  5. ./configure; gmake; gmake install



The query browser
requires gtkhtml 3.0. Unfortunately, I was unable to build that version but, luckily, the query browser's configure script offers a --with-gtkhtml=libgtkhtml-3.# option. I choose gtkhtml 3.1.20 and built the query browser against that. FYI - OpenBSD 3.8 offers gtkhtml 3.6.2 as a package; I have not upgraded yet but those that have, you should install the packaged version and attempt a build against that version of gtkhtml.
  1. build mysql-gui-common found inside unpacked directory.
  2. modify ./source/linux/MQHistory.cc
  3. gmake. You will get the following error:
       make: don't know how to make w. Stop in /home/krichard/mysql-gui-4.0.23p1/mysql-query-browser-1.1.14/mysql-query-browser/source/linux/gtksourceview.

    This is an easy fix. cd source/linux/gtksourceview; gmake; cd ../../..
  4. gmake; gmake install
I am able to start the application but when I try to connect to external or local databases, I get Segmentation faults. Kinda limits the tools usefulness but one step at a time... This may be because of using the wrong gtkhtml version



If you are installing into non-standard areas (e.g, a prefix not /usr/local) my advice is to build the mysql-gui-common that came with the GUI tool you are installing. If you are using non-default values for the parent GUI tool, such as --prefix, make sure the mysql-gui-common gets the same options, if applicable.

If you are installing both the admin and query browser into the same prefix, you may have problems with conflicting gui-common installations. I have not tested this part yet.

  1. modify ./library/source/myx library.c
  2. (admin-1.0.22a only)
    mv ./library/tests/read_international/read_international.cpp0000644 ./library/tests/read_international/read_international.cpp
  3. build





MySQL Admin/Query GUI requirements (see bug report about building against < MySQL 4.1.1):
    Query Browswer

Bug Report for Incorrect MySQL requirements (and the fix):

Running Administrator 1.1 against < MySQL 5.0.3 fails because of missing mysql.procs_priv table . MySQL Admin 1.1 will try to select from procs_priv when doing User Administration.
    mysql.procs_priv table was added in MySQL 5.0.3

Gtkmm 2.0/2.2 can be installed in parallel with gtkmm 1.2 (version 1.2 is available in 3.7 i386 packages) This is based entirely off of the following gtkmm webpage.



Building from source can be as simple as running ./configure; gmake; gmake install .
To see all options available for each package, run ./configure --help

The following are links to tarred/zipped formats. If you would rather have bz2, you will find them in the same directory.

gtkhtml-3.1.20 (Query Browser only)
Administrator 1.0
Administrator 1.1
Query Browser 1.1

MD5 (libsigc++-1.2.7.tar.gz) = b939751dff0db9652c5dbfc9de685efa
MD5 (gtkmm-2.2.12.tar.gz) = 99f4580a55db3926753446ddff55a478
MD5 (gtkhtml-3.1.20.tar.gz) = 0b47f10a77b0244af3c25a109ae98e0c
MD5 (mysql-administrator-1.0.22a.tar.gz) = ed0f1af3eb7be03c2785ad9057492b75
MD5 (mysql-administrator-1.1.2.tar.gz) = 3d8bfbadbe160d9cd73ce3cce1eb088a
MD5 (mysql-query-browser-1.1.14.tar.gz) = dd185df8266f7375924dcc732258e9e7


Keith Alan Richardson
keith dot alan at gmail dot com