Windows InstallWindows Install giulia Tue, 02/25/2020 - 16:37
First download the required installer file from: https://www.monetdb.org/downloads/Windows/. You probably want to to choose the Latest subdirectory.
MonetDB5-SQL-Installer-*.msi installers for 64-bit (x86_64) and 32-bit (i386). Use 32-bit version only on 32-bit Windows OS. Use 64-bit if your OS is 64-bit.
Note: There is no separate installer if you only require the client progams (mclient, msqldump) without the server. The complete (server and clients) installation only requires some 20 MB of disk space, much less than other RDBMS software.
The MonetDB ODBC driver is available as a separate independent installer program, for 64-bit (x86_64) and 32-bit (i386). On 64-bit OS you may need to install both ODBC drivers (64-bit and 32-bit) when you want to run a 32-bit application that uses ODBC to connect to MonetDB.
If this is your first time you install MonetDB/SQL just start the downloaded installer program and answer the questions in the dialogs. It is also possible to choose a custom install where you can select which components (such as the optional geometry/GIS module, optional header and lib files, optional debug files, optional Python 3 integration) to install and specify a different installation directory.
If you already had a version of MonetDB installed the installer program will do an upgrade of the MonetDB software, replacing the previous installed version. So before you run the downloaded installer program, make a backup of your database(s) in case you need to go back to the previous version. Also copy edited M5server.bat and mclient.bat files as they will be overridden by the installer program. Next check via Task Manager that no more mserver5.exe process is running. Now you can start the installer program.
Important: the installer program and MonetDB server software only supports upgrades, not downgrades. So it is important to make backups of your original databases before upgrading the MonetDB software and starting the new server software on existing database(s). If you haven't made a backup it is not possible to go back to the previous database version.
Note: the database itself will be upgraded to the new server version the first time the upgraded server is started for that database. At start up the MonetDB server checks if the database exists (if not it is created and initialised) and whether it is of an older version than the server software. If so the server software will first upgrade the database to match the server software. This database upgrade process may take some time especially if you upgrade from a very old version. During this database upgrade process no connections to the server are possible as the database is not available yet. If the upgrade fails for some reason the server cannot start and exits. Check the MonetDB server console window for logged errors. If the database upgrade is completed successfully the server becomes available for clients to connect to.
Note: the installer program also contains functionality to Change, Repair and Remove the installed MonetDB software. So keep the installer program file for later use.
Starting the MonetDB server after installation
On Windows the first step is to start a MonetDB server by simply opening: 'Start -> Programs -> MonetDB -> Start server'. Alternatively you can use Explorer and go to the install directory and double click on M5server.bat.
The first time the you start the MonetDB server it will create a new database named demo. This may take a few seconds, watch the Windows console output window. Wait till it shows:
# MonetDB/SQL module loaded
# MonetDB server is started. To stop server press Ctrl-C.
Subsequently you can start the textual interface (mclient) by opening: 'Start -> Programs -> MonetDB -> SQL client'. Alternatively you can use Explorer and go to the install directory and double click on mclient.bat.
The commands entered in mclient are identical to those found on other platforms.
To stop the server, you can simply close the MonetDB/SQL server console window.
Note: the server by default only accepts connections originating from the local host. If you need other machines to access your database, change the configuration file by setting mapi_open=yes.
Changing database location
If you need (or want) to change the location of the database then editing of the monetdb script is required. Copy the mclient.bat and M5server.bat files in 'C:\Program Files\MonetDB\MonetDB5' and edit the copied files. In the M5server_copy.bat file you would need to change the setting of the MONETDBFARM variable, and in mclient_copy.bat you would need to add a -d option to the call of mclient.exe.
Note: on upgrade of MonetDB software the files mclient.bat and M5server.bat will be overwritten, so copy them and edit the copies.