Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #232194

Re: Custom mariadb installation

From Andy Smith <andy@strugglers.net>
Newsgroups linux.debian.user
Subject Re: Custom mariadb installation
Date 2021-02-27 19:40 +0100
Message-ID <BNcFr-8ns-3@gated-at.bofh.it> (permalink)
References <BMQvf-3of-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On Fri, Feb 26, 2021 at 10:44:27AM -0800, Bill wrote:
> So I'd like to install mariadb on Debian 10 with the
> --basedir=/usr/local/mariadb and --datadir=/data/mariadb. I've tried to add
> these options to the "apt install mariadb-server" command line but I get
> error messages saying the options aren't recognized.

Those are options for the mariadb program itself. You can put them
in configuration files, overriding what is already set, e.g.:

$ sudo ack datadir /etc/mysql/
/etc/mysql/mariadb.conf.d/50-server.cnf
21:datadir                 = /var/lib/mysql

So I would suggest making your own custom config file in
/etc/mysql/mariadb.conf.d/ numbered after 50 and override it there:

[mysqld]
basedir = /usr/local/mariadb
datadir = /data/mariadb

Do bear in mind that the installation of mariadb will create some
databases in the default location first as part of its setup. You
may want to pre-create your config files (which the install won't
overwrite) so that it gets the correct settings at first startup and
during the initial configuration.

Also mariadb doesn't have an AppArmor profile at the moment but it
could grow one, so you'd have to watch out for that as it's very
likley to restrict the daemon to only being able to access
/var/lib/mysql.

Cheers,
Andy

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Custom mariadb installation Bill <bill3@uniserve.com> - 2021-02-26 20:00 +0100
  Re: Custom mariadb installation The Wanderer <wanderer@fastmail.fm> - 2021-02-26 20:00 +0100
  Re: Custom mariadb installation Andy Smith <andy@strugglers.net> - 2021-02-27 19:40 +0100

csiph-web