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


Groups > linux.debian.user > #232162 > unrolled thread

Custom mariadb installation

Started byBill <bill3@uniserve.com>
First post2021-02-26 20:00 +0100
Last post2021-02-27 19:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  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

#232162 — Custom mariadb installation

FromBill <bill3@uniserve.com>
Date2021-02-26 20:00 +0100
SubjectCustom mariadb installation
Message-ID<BMQvf-3of-1@gated-at.bofh.it>
Hi guys,

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.

So what then is the correct way to install mariadb using unique, 
non-standard root and data directories?

	Thanks much,

	Bill
-- 
Sent using Icedove on Debian GNU/Linux.

[toc] | [next] | [standalone]


#232163

FromThe Wanderer <wanderer@fastmail.fm>
Date2021-02-26 20:00 +0100
Message-ID<BMQvf-3of-3@gated-at.bofh.it>
In reply to#232162

[Multipart message — attachments visible in raw view] — view raw

On 2021-02-26 at 13:44, Bill wrote:

> Hi guys,
> 
> 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.
> 
> So what then is the correct way to install mariadb using unique, 
> non-standard root and data directories?

Download the source package, adjust the configuration options in the
debian/ directory (and give it a new package version which will never be
used by the official maintainers), and build the package(s) locally.

Or else download the source from upstream and configure/build it
yourself, then install from there, bypassing the Debian packages entirely.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

[toc] | [prev] | [next] | [standalone]


#232194

FromAndy Smith <andy@strugglers.net>
Date2021-02-27 19:40 +0100
Message-ID<BNcFr-8ns-3@gated-at.bofh.it>
In reply to#232162
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web