Customize install MariDB on Linux Redhat.

how to install mariaDB server other than default /usr. Also I want to create DB under /data and all the table data should go in /data. How do I do that? My server is Linux redhat.

Answer Answered by Daniel Black in this comment.

change the /etc/my.cnf have a datadir=/data under a [mariadbd] section heading

ensure that /data is mounted and has permission for the mysql user (chown mysql: /data)

Run

mysql_install_db -u mysql

set the selinux labels for the /data directory per https://mariadb.com/kb/en/selinux/

Start the mariadb.service as usual.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.