You are viewing an old version of this article. View the current version here.

You can run mysqld directly from the source directory (without doing make install).

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

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

# Example mysql config file.
# You can copy this to one of:
# /etc/my.cnf to set global options,
# /mysql-data-dir/my.cnf to get server specific options or
# ~/my.cnf for user specific options.
# One can use all long options that the program supports.
# Run the program with --help to get a list of available options

# This will be passed to all mysql clients

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# The MySQL server
set-variable  = key_buffer=16M
set-variable  = thread_cache=4
loose-innodb_data_file_path = ibdata1:1000M

######### Fix the two following paths

# Where you want to have your database

# Where you have your mysql/MariaDB source + sql/share/english

set-variable = max_allowed_packet=16M


set-variable= key_buffer=128M

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

./scripts/mysql_install_db --srcdir=$PWD --datadir=/path/to/data/dir

Above '$PWD' is the environment variable that points to your current directory.

Now you can start mysqld in the debugger:

cd sql
ddd mysqld &

Or start mysqld on its own:

cd sql
./mysqld &

After starting up mysqld 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:

configure --with-plugin-<plugin_name>

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

mysqld --plugin-dir=source-dir-path/storage/connect/.libs


Comments loading...