Hello,
I have put together a guide on building
mysql-administrator and mysql-query-browswer on
OpenBSD. Below is a text version (html version is
available; I can send it to anyone interested).
I have submitted the html version to daniel at
openbsdsupport.org.
This is a work in progress. Any help testing,
commenting, expanding,
correcting, etc... is always appreciated.
One change I am not sure about;
mysql-administrator/source/linux/MAServerLogsPanel.cc
(I replaced
_XOPEN_SOURCE with _GNU_SOURCE; otherwise the
compiler complains
about missing math functions)
Thanks,
Keith Richardson
HOWTO Install MySQL ADMIN/QUERY GUI Tools
Build Requirements Administrator Query Browser
References Source
Locations Author
BUILD REQUIREMENTS
The build requirements are for the administrator gui.
650 MB for source builds. Disk spaced used by package
installations is
unknown.
download source code for gtkmm 2.2, libsigc++-1.2.7,
mysql-administrator and/or mysql-query-browser
install package mysql-client-4.0.23 (this installs the
server as well)
install package gtk+2-2.4.14.tgz install package
gmake-3.80p0.tgz
install package m4-1.4.tgz (required for libsigc++1.2)
build from source: libsigc++-1.2.7 (required for gtkmm
2.2)
install package pkgconfig-0.15.0.tgz (required for
gtkmm 2.2)
build from source: gtkmm 2.2 (can be installed with
gtkmm 1.2)
install package libglade2-2.4.0p0.tgz install package
pcre-4.5.tgz
MYSQL-ADMINISTRATOR
If you plan on connecting to 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 probably other features),
mysql-admin
1.1.14 needs to connect to a MySQL 5.0.3 database.
This version of
mysql-admin 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.
build mysql-gui-common found inside unpacked
directory. modify
./source/linux/MInstanceInfo.cc modify
./source/linux/MAServerLogsPanel.cc (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
./configure; gmake; gmake install
QUERY-BROWSER
Coming soon
MYSQL GUI COMMON
My advice is to build the mysql-gui-common that came
with the GUI tool
you are installing. If you are installing both query
browswer and
administator, you should build each mysql-gui-common.
Make sure you
give configure the same prefix you gave the enclosing
gui tool
(either query browser or administrator)
modify ./library/source/myx library.c (admin-1.0.22a
only)
mv
./library/tests/read_international/read_international.cpp0000644
\
./library/tests/read_international/read_international.cpp
./configure
--prefix=/same/prefix/as/parent/admin/or/query; gmake;
\
gmake install
SOURCE CODE CHANGES
mysql-gui-common/library/source/myx_library.c
--- mysql-gui-common/library/source/myx_library.c.dist
Tue Sep 20 18:54:13 2005
+++ mysql-gui-common/library/source/myx_library.c
Tue Sep 20 18:54:45 2005
@@ -581,11 +581,14 @@
//of mysql_real_connect are in utf8
//mysql_options(mysql, MYSQL_SET_CHARSET_NAME,
"utf8");
+#if defined(MYSQL_VESION_ID) && (MYSQL_VERSION_ID >=
40101)
if (myx_mysql_get_private(mysql)->embedded)
mysql_options(mysql,
MYSQL_OPT_USE_EMBEDDED_CONNECTION, (char *)1);
else
mysql_options(mysql,
MYSQL_OPT_USE_REMOTE_CONNECTION, (char *)1);
+#endif
+
if (!mysql_real_connect(mysql, user_conn->hostname,
user_conn->username,
user_conn->password,
user_conn->schema,
user_conn->port,
mysql-administrator/source/linux/MInstanceInfo.cc
---
mysql-administrator/source/linux/MInstanceInfo.cc.dist
Tue Sep 20 19:06:16 2005
+++ mysql-administrator/source/linux/MInstanceInfo.cc
Tue Sep 20 19:06:28 2005
@@ -846,6 +846,11 @@
info.free= (long long)fs.f_bsize * fs.f_bavail;
info.type= "unknown";
+
+#ifdef OpenBSD
+info.type= fs.f_fstypename;
+#else
+
for (unsigned int i= 0; i <
sizeof(fstypes)/sizeof(FSType); i++)
{
if (fstypes[i].id == fs.f_type)
@@ -854,6 +859,7 @@
break;
}
}
+#endif
return true;
}
mysql-administrator/source/linux/MAServerLogsPanel.cc
---
mysql-administrator/source/linux/MAServerLogsPanel.cc.dist
Tue Sep 20 19:07:29 2005
+++
mysql-administrator/source/linux/MAServerLogsPanel.cc
Tue Sep 20 19:12:19 2005
@@ -14,7 +14,7 @@
along with this program; if not, write to the Free
Software
Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA */
-#define _XOPEN_SOURCE /* glibc2 needs this */
+#define _GNU_SOURCE /* glibc2 needs this */
#include <time.h>
#include "myadmin.h"
REFERENCES
MySQL Admin/Query GUI requirements (see bug report
also):
http://dev.mysql.com/doc/administrator/en/mysql-gui-install-source-linux-prerequisites.html
Bug Report for Incorrect Build requirements (fix):
http://bugs.mysql.com/bug.php?id=12585
" The procs_priv table exists as of MySQL 5.0.3 "
http://dev.mysql.com/doc/mysql/en/privileges.html
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
gtkmm website; I have not tested this.
http://www.gtkmm.org/download.shtml
ONLINE SOURCE LOCATIONS
Building from source can be as simple as running:
./configure; gmake; gmake install
To see all options available for each package, run
./configure --help
http://ftp.gnome.org/pub/GNOME/sources/libsigc++/1.2/libsigc++-1.2.7.tar.gz
http://ftp.gnome.org/pub/GNOME/sources/gtkmm/2.2/gtkmm-2.2.12.tar.gz
http://dev.mysql.com/downloads/administrator/1.0.html
http://dev.mysql.com/downloads/administrator/1.1.html
http://dev.mysql.com/downloads/query-browser/1.1.html
Still need to find query browser for 1.0
http://dev.mysql.com/downloads/query-browser/1.0.html
doesn't work
MD5 (libsigc++-1.2.7.tar.gz) =
b939751dff0db9652c5dbfc9de685efa
MD5 (gtkmm-2.2.12.tar.gz) =
99f4580a55db3926753446ddff55a478
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
AUTHOR
Keith Alan Richardson