MaxDB:Installation
Hello MaxDB users, administrators, hobbyists and community!
This, the third of our weekly articles on MaxDB, will cover the installation of the MaxDB server and associated tools. One of the features the team is most proud of is MaxDB's ease of installation and the speed with which it occurs. It's been estimated that a DBA with no prior knowledge of the system can complete a basic installation in less than 15 minutes. Please note that this does not include download time.
Do feel free to discuss this article with us on the #maxdb channel on irc.freenode.org. I've provided a web interface to this channel here: http://irc.colliertech.org/
Selecting a version
Before beginning the installation, one must decide which version of the software to install. If this is your first experience with MaxDB, I strongly recommend the newest and best. As of February 17, 2006, this is build 16 of version 7.6.00, or 7.6.00.16. If you are upgrading from an already-installed version, there are some factors to consider:
Are you upgrading a production database?
If you are running a production environment and intend to upgrade your database, you should first consider creating a testing environment. Although the MaxDB development team keeps stability and backward compatability always at the forefront of their mind, not all situations can be accounted for. For safety's sake, we recommend replicating your production environment, upgrading the replication, and then shifting the load from the production machine to the backup system. To keep this document on course, however, we will not cover this process in this document.
The MaxDB FAQ has some hints on upgrading, and the MaxDB manual has the details under the "Upgrade" section of the Glossary.
Which version do you currently have installed?
If you are running a production environment, you should consider upgrading to the most recent version of the branch you are currently running. For instance, if you are running a v7.5 database, we recommend upgrading to latest version on the 7.5 download page, and if you are running a 7.6 database, we recommend upgrading to the latest version on the 7.6 download page.
Are there features that you need?
If there are hot new features in the latest revision of the database that you simply cannot live without, you will want to get the latest revision. These can always be found at the official MaxDB release page, http://www.mysql.com/products/maxdb/
Are you more comfortable with a GUI or CLI interface?
The installer package comes with both a GUI and CLI interface. The GUI is more user-friendly and provides an Interactive way to get familiar with the process of installing the software. The CLI version can be run as a Background Installation (without user interaction) and automated in batch or shell scripts. For those who use RPM-based GNU/Linux OSs such as Redhat, SuSE and Mandrake, there are also RPMs of 7.5 and 7.6 available at the official MaxDB page.
See also MaxDB FAQ: Which choices for installations do I have?
Unofficial installation options
Since MaxDB is Free / Open Source Software (F/OSS), there are un-supported installation options to select from as well. Two of the most common are the Debian distribution of MaxDB 7.5 and the option of building from source.
- Debian GNU/Linux MaxDB packages (version 7.5 only)
$ apt-cache search maxdb | grep ^maxdb maxdb-buildtools - Tools needed to build the MaxDB database system maxdb-dbanalyzer - A performance monitoring tool for MaxDB databases maxdb-dbmcli - The MaxDB database manager command line interface maxdb-doc - Documentation of the MaxDB database system and all of its tools maxdb-loadercli - A load/unload tool for MaxDB databases maxdb-lserver - Loader server client of the MaxDB database package maxdb-server - Communication server for the MaxDB database system maxdb-server-7.5.00 - A transactional, industrial-strength SQL database system maxdb-server-dbg-7.5.00 - Debug versions of the database server kernel maxdb-sqlcli - A command line query interface to MaxDB databases maxdb-webtools - MaxDB webserver with WebDBM and WebSQL applications
- Building from source
- Source (tarballs and zip files) can be found on the official MaxDB page. Note that servers built from source are not supported.
MaxDB Installation Manager
The following illustrated introduction to MaxDB's installer is brought to you as a joint effort between Ulf Wendel (Windows XP) and myself (Ubuntu GNU/Linux).
Recommended system specifications for MaxDB are:
- 700M free disk space
- 256M memory
- Pentium II class processor operating at 300MHz
After downloading the MaxDB package, unpack it and run SDBSETUP.
We will now walk through a typical installation procedure.
Pre-install
http://blog.ulf-wendel.de/images/win1_k.jpg
Start the timer!
Start Installation
http://dev.mysql.com/tech-resources/articles/syncman/images/00_InstallationManager_p1.png
Here, we select "Start installation/upgrade" in order to get the installation underway. You may select Show MaxDB components to display the packages available for installation and already installed. You may also delete installed components and visit the MaxDB website.
Select Installation Profile
http://dev.mysql.com/tech-resources/articles/syncman/images/02_InstallationManager_p2.png
Here, we select Server + Client in order to install the MaxDB server along with the tools for daily usage, including the Synchronization Manager.
http://dev.mysql.com/tech-resources/articles/syncman/images/03_InstallationManager_p2_details.png
You can see here the client software that will be installed along with the server. Some key components are:
SQLDBC
This is the C/C++ library for programmatic access to MaxDB.
JDBC
Much like SQLDBC, but for the Java programming language.
Loader
The Loader enables the Export from a MaxDB database instance to the file system or the Import of application data from the file system to a MaxDB database instance.
Because the Loader supports a great number of file formats it can often be used to import and export data instead of special application programs. Due to its specialization on MaxDB database instances the Loader offers maximum performance.
Furthermore, the Loader supports the direct transport of data from one database instance to another, which runs on a different hardware structure or a different operating system.
Optionally you can transport the entire data of a database instance, of a certain database user, the individual tables of a special database schema or only a number of qualified columns. Besides files, pipes and back-up tools by other providers are also supported as transport media.
The Loader is a command line tool and can be used on all operating systems supported by the database system.
ODBC
This is the Open Database Connectivity library, an industry standard API for database connectivity.
Synchronization Manager
This tool synchronizes portions of databases using the Java Messanging Service. The database access layer is system-agnostic and based on JDBC. Example replication databases include MaxDB, MinDB, and to a lesser extent, MySQL.
Choose Installation Type
http://dev.mysql.com/tech-resources/articles/syncman/images/04_InstallationManager_p3.png
Select the top choice, "Install software and create database instance." The installer will handle all of the details for you and select reasonable defaults.
Select Database Configuration
http://dev.mysql.com/tech-resources/articles/syncman/images/05_InstallationManager_p4.png
For this installation, chose PC / Laptop. This installs the most common pieces of software along with the database.
Database Name / Auth configuration
http://dev.mysql.com/tech-resources/articles/syncman/images/06_InstallationManager_p5.png
Leave the database name, size and username values as they are. In fugure articles, it will be assumed that the password has been left as the default.
Specify installation Location
http://dev.mysql.com/tech-resources/articles/syncman/images/07_InstallationManager_p6.png
The database software installation path and installation prefix should be left as their defaults (/opt/sdb/programs and /var/opt/sdb/data, respectively in this example); It will be assumed that default values are used throughout the articles.
View Summary
http://dev.mysql.com/tech-resources/articles/syncman/images/08_InstallationManager_p7.png
You are presented with an outline of the installation overview. If the settings seem correct to you, continue with the installation by pressing the "Install" button.
Installation progress
http://dev.mysql.com/tech-resources/articles/syncman/images/09_InstallationManager_p8.png
The installer proceeds to copy the files to the destinations previously selected. Patience...
Complete!
http://blog.ulf-wendel.de/images/win9_k.jpg
Installation complete. It took us 4 minutes and 36 seconds to install an enterprise database and create a database instance. Less than 5 minutes for the installation, 15 minutes for installation of everything plus backup. If you do it for the second time, you'll be able to: install the server software, create a database instance, install all GUI tools, setup automatic backup and do the first backup and issue the first SQL command within the 15 minutes limit that MySQL AB has defined for all it's products. Ease of use is our company philosophy.
xserver
In order to connect to a remote MaxDB installation, you must start the xserver process. On Linux and other Unix-like systems, this can be done by issuing the /opt/sdb/programs/bin/x_server command. In a Windows environment, the program is C:\Program Files\sdb\programs\bin\x_server.exe
Connecting to MaxDB using the Database Manager (DBM) GUI
Install GUI tools
You can download the MaxDB GUI tools, including DBM GUI and SQL Studio from the MaxDB home page: http://dev.mysql.com/downloads/maxdb/7.6.00.html#clients
The Command Line Interface (CLI) tools come bundled with the MaxDB server.
Connect to MAXDB1 database instance
http://blog.ulf-wendel.de/images/win15_k.jpg
After installing the tools, you can connect to the MAXDB1 instance using Database Manager
Easy administration
http://blog.ulf-wendel.de/images/win20_k.jpg
You can easily issue your daily DBA commands to your MaxDB databases using the user-friendly Database Manager. To do so, ensure that MaxDB is running. On Windows, you can start your MaxDB database by running the Database Manager (Start->All Programs->MySQL MaxDB->Database Manager). When the Database Manager starts, click the Add button in the Database Instance window. Select <Local> and <Default> from the Database Server and Port pulldown menus and click Add. Select the MAXDB1 database and press the OK button.
Select MAXDB1 from the top right window and select Instance->Connect from the pulldown menu.
You will see that your database is in the "Offline" state. Click the green button in the top menu or select Actions->Online from the pulldown menu. Your database should now be in the online state.
Issuing queries with SQL Studio
http://blog.ulf-wendel.de/images/win41_k.jpg
SQL Studio provides a simple interface to issuing queries to your MaxDB databases. You can point and click and view your results in an easy-to-understand spreadsheet layout.
Start SQL Studio (Start->All Programs->MySQL MaxDB->SQL Studio)and log in to MAXDB1 on localhost. When SQL Studio starts, click Session->Connect from the pulldown menu. Enter 'localhost' in the Server text field and 'MAXDB1' in the Database field. Enter your database user and password in the appropriate fields.
In the SQL Dialog 1 window, enter the following:
SELECT 'hello world' from DUAL
Now press F8 to issue the command to your database. You should be presented with a 1x1 result that says "hello world". Congratulations. You have just successfully issued your first SQL query to MaxDB.
You can also try this query:
SELECT * FROM domain.versions
Shutting down with Database Manager
http://colliertech.org/~cjcollier/images/mysql/maxdb/hoteldb-offline.png
Shutting down an instance with the Database Manager is as simple as clicking Actions->Offline from the menu.
In the next issue
In the next issue, we'll describe in more detail the use of the Database Manager and SQL Studio. We will also present dbmcli and sqlcli, the command-line interfaces to issuing database commands and SQL queries to MaxDB.
We hope that you will join us in one week for this exciting and educational article. Until next time, we wish you happy hacking.
C.J. Collier on behalf of the MaxDB team