www.grootersnet.nl

MySQL


MySQL is a database system, well known in the *x  world, and ported to VMS by Jean-François Piéronne. I had installed it before (version 3.something) but ran into quite a number of problems that made it useless. One thing at that time was that the default 'format' for the database was MyIsam - the wrong choice for VMS. I should have used InnoDB in stead, but that came to my knowledge too late.

But since I wanted to do something with PHP, it's virtually a requirement: Support for MySQL is built-in. So I downloaded the latest version (4.1) from JFP's download site You need more that just MySQL, there are some dependencies, but all required kits can be downloaded from here.

The site also contains a guide to install and initiate the database. Following these instructions should be enough to install a basic MySQL database. It helps to have this page in front of you during installation.

Installation and basic configuration is therefore straightforward: just follow the instructions.

One part you'll need to do is to check the configuration file (step 5 in a new installation). Though it's optional, I think it's a good thing to take a look in there. One thing worthwhile to change is the location of the database files - default it's on the same location as the code and I wanted it to store it elsewhere, so you'll need to change the location in this file.

The original contents is:

innodb_data_home_dir = /mysql_root/data/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /mysql_root/data/
innodb_log_arch_dir = /mysql_root/data/

but I wanted it to be on a logical disk (database:) so this is what shows up now:

innodb_data_home_dir = /database/mysql41/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /database/mysql41/
innodb_log_arch_dir = /database/mysql41/

and that causes the database files (and logs) to reside where I wanted them

I left the rest as it was because I don't know what the consequences would be. I didn't had to change anything more, as InnoDB is the default technology on VMS. That prevented a lot of trouble!

To have it started, be sure to have the startup procedure be executed in the startup sequence - as stated in this handout. One thing I miss: What should be done to stop the database server properly on system shutdown...I have found some trouble caused by a system crash: I lost some data I entered before, but that might well have been my own mistake.

Documentation on www.mysql.org doesn't take VMS into account, but that's not really a surprise.

To use the database by PHP applications, next install PHP - for WASD in my case. One application that comes handy after that, is PHPMyAdmin


Back to HowTo

Back to OpenVMS

Back home


(c) 2003- 2007 W. Grooters    Last updated 01-01-2008