Although NetWare has long had a reputation for being a file and print server operating system, it has also long been a platform for hosting network databases. Windows NT/2000 may get more recognition because of Microsoft SQL Server and Oracle but NetWare is equally capable of hosting SQL databases. Novell used to include Oracle in NetWare, but recently has moved to support the popular open source database, MySQL.
MySQL is an open source database that supports the SQL-database language. MySQL is licensed under the GPL license, meaning you can use it free of charge as long as you're not developing and selling an application based on MySQL. However, if you do want to sell an application, you can purchase a commercial license.
Like most SQL databases, MySQL's syntax varies slightly from the SQL used by Oracle or Microsoft's SQL Server. The variations are analogous to American, Australian, and British English. Where MySQL doesn't vary is in its support for operating systems. Because it's open source, MySQL has been ported to many different platforms. Some of MySQL's supported platforms, other than NetWare, include:
- Mac OS X
For the purposes of this Daily Feature, I'll be discussing MySQL 4.013, which is the current version of MySQL for production environments on all operating systems. MySQL 4.1 and MySQL 5.0 are in the beta and alpha stages respectively, but there are no NetWare betas of these versions. In a production environment, you wouldn't want to run a beta anyway, so that's not a problem.
Obtaining and preparing for MySQL
You can get MySQL for NetWare directly from MySQL's Download page. You must fill out a form before downloading the software, and then you'll be directed to a page with download mirrors where you can select a site to download MySQL from. The file you'll download (mysql-standard-4.0.13-pc-netware-i686.zip at the time of this article) is only 5.7 MB in size, so it won't take long to download.
Extract the file to a temporary directory on your server, but don't install it just yet. First, you must make sure your NetWare server is ready to run MySQL. According to the documentation, MySQL only runs on NetWare 6 and later, so if you're running NetWare 4.x or 5.x, you're out of luck. That said, I didn't have any problems getting MySQL to load on my NetWare 5.1 test server. However, be aware that because NetWare 5.1 is officially unsupported, you probably shouldn't use it in a production environment.
Additionally, you must be running Support Pack 2 or later on NetWare 6 along with the latest C Libraries for NetWare. Finally, you must have an NSS volume on your NetWare server to support MySQL's data directories.
The C Libraries, also known as LibC in Novellspeak, provide support for multithreaded and multiprocessor applications on NetWare. If you've never used any third party software on your NetWare server before, you've probably never installed them. Because LibC and MySQL are both constantly being updated by programmers, you should make sure you obtain the latest version of LibC to make sure that it's compatible with MySQL.
You can obtain the latest version of LibC directly from Novell's LibC Web site. On the site, you can download just the binaries, sample C code, LibC documentation, or everything. Unless you're going to also write your own NetWare C code, all you need to do is download the binaries, which you can do by clicking the Binaries download link. You'll then download Libc.exe to your server. It's only 5.4 MB, so it will download in about the same amount of time that MySQL did.
Once you've downloaded the file, Libc.exe, run it from your administration workstation. You may be surprised at first because doing so will launch a Windows wizard. Follow the onscreen wizard prompts to store the LibC files on your administration workstation.
From there, things become complicated. You must now manually copy the LibC files from your administration workstation to your server. While that may not seem like a complicated task, you must copy the files to the c:\nwserver directory on your NetWare server. Don't mistake this directory for a NetWare volume. The files must go on the DOS partition of your NetWare server. You can do so by using Rconsole, a third party utility that allows you to access C: such as JCMD, by downing your server and accessing it via floppy or by using DOSFAT support in NSS. For more information about using DOSFAT, see the Daily Feature, "Use DOSFAT to access your NetWare Server's DOS partition."
Specifically installing LibC is beyond the scope of this article. Just follow the directions under Section 2.0 of the Readme file that accompanies LibC. You'll have to reboot your server before installing MySQL.
To install MySQL on your NetWare server, extract the mysql-standard-4.0.13-pc-netware-i686.zip file to the NSS volume of the NetWare server on which you plan to run MySQL. Doing so will create a directory called mysql-4.0.13-pc-netware-i686 with all of the MySQL files inside of it. To prevent having to type such a long pathname on your server console when executing MySQL, change the name of the directory to something smaller, such as plain MYSQL.
You'll then need to access your server's console prompt. At the console prompt, type search add nss:mysql\bin and press [Enter] where nss is the name of the NSS volume into which you've installed MySQL. This will add the MySQL\BIN directory to the server's search path. That will cause NetWare to look in this directory for the appropriate MySQL NLMs without your having to specify the directory path at the command line.
Before you can run MySQL, you must register its initial database. To do so, type mysql_install_db at the console prompt and press [Enter]. MySQL will then initialize the database and display the initialization screen. Check the screen for errors and follow the onscreen instructions to resolve them. Press any key to close the screen.
You then launch MySQL by typing mysqld_safe and pressing [Enter]. MySQL will load, displaying a screen that shows such information as:
- The TCP/IP Port that MySQL listens
- MySQL's data directory
- Error log locations
- Program log locations
To jump back to the server console prompt, press [Ctrl][Esc] and then press .
Once you have MySQL running on your NetWare server, it works just the same way as if you were hosting your MySQL databases on Linux, UNIX, or Windows. For more information about using MySQL, see the Daily Drill Down, "An introduction to the MySQL command line."