Connecting to a MariaDB database from Altair SLC on Windows

IanBD
IanBD
Altair Employee
edited January 2023 in Altair RapidMiner

MariaDB is the Open Source successor to MySQL. (MySQL is now owned by Oracle.) It is widely used in web applications. SLC has a specific “mariadb” engine as well as a “mysql” engine.

In addition to the native MariaDB engine that is bundled with SLC, you can also choose to use the generic ODBC engine, also included with SLC. Please note that in both cases, a driver for MariaDB must be installed on the machine where SLC is running.

We recommend the native MariaDB engine with the MariaDB Connector/C client.

To install the client you need to:

  1. Download and install the 64-bit MariaDB Connector/C client installer, (typically a .msi file) from the MariaDB Connector/C client page of the MariaDB website.
  2. On the same device as Altair SLC is installed, run the MariaDB installer.
  3. Add the MariaDB Connector/C client to the system PATH variable. Check first as the following procedure might have been done automatically. Otherwise:
    • In the Windows Control Panel, select System and Security. Select System and click Advanced System Settings.
    • In the Advanced tab, select Environment Variables.
    • Select the PATH entry in the System Variables, click Edit.
    • In the Edit environment variable dialog box, click New and enter the installation folder path.
    • Click OK to save the changes, and close the remaining system and security dialogs by clicking OK each time.

Once the client has been installed, test the database connectivity with the following SAS language program:

LIBNAME DATASRC MARIADB USER=user-name PASSWORD=password 
SERVER=remote-id DATABASE=dbase;
PROC DATASETS LIBRARY=DATASRC;
RUN;
  • In the LIBNAME statement, replace user-name and password with your user name and password for the remote-id server, and replace dbase with the name of the MariaDB database.
  • The DATASETS procedure returns the names of all tables in the selected database; for databases with large numbers of tables, this program might take some time to run.