Running MariaDB From the Build Directory

Instructions for developers on how to run MariaDB directly from the source build directory without installing it to system paths.

You can run mariadbd directly from the build directory (without doing make install).

Starting mariadbd After Build on Windows

On Windows, the data directory is produced during the build.

The simplest way to start database from the command line is:

  1. Go to the directory where mariadbd.exe is located (subdirectory sql\Debug or sql\Relwithdebinfo of the build directory)

  2. From here, execute:

mariadbd.exe --console

Pass other server parameters on the command line, or store them in a my.ini configuraton file and pass --defaults-file=path\to\my.ini .

The default search path on Windows for the my.ini file is:

  • GetSystemWindowsDirectory()

  • GetWindowsDirectory()

  • C:\

  • Directory where the executable is located

Starting mariadbd After Build on Unix

Copy the following to your '~/.my.cnf' file.

There are two lines you have to edit: 'datadir=' and 'language='. Be sure to change them to match your environment.

With the above file in place, go to your MariaDB source directory and execute:

  • $PWD is the environment variable that points to your current directory. If you added datadir to your my.cnf, you don't have to specify this option.

Now you can start mariadbd in the debugger:

Or start mariadbd on its own:

After starting up mariadbd using one of the above methods (with the debugger or without), launch the client (as root if you don't have any users setup yet).

Using a Storage Engine Plugin

The simplest case is to compile the storage engine into MariaDB:

Another option is to point mariadbd to the storage engine directory:

This page is licensed: CC BY-SA / Gnu FDL

Last updated

Was this helpful?