Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • MariaDB Cookbook
  • Toc
  • feedback
MariaDB Cookbook

MariaDB Cookbook

By : Daniel Bartholomew
4.2 (9)
close
MariaDB Cookbook

MariaDB Cookbook

4.2 (9)
By: Daniel Bartholomew

Overview of this book

Table of Contents (20 chapters)
close
MariaDB Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Securing MariaDB files on Linux


Filesystem security is an important part of keeping the data in our databases safe. This is because MariaDB, like most programs, stores the data it handles in files on our filesystem. If those files can be read and copied by anyone who can log in to the server, then there's nothing stopping them from making a copy of those files and then accessing them with MariaDB on another server. This recipe is about securing our files on Linux.

Getting ready

Prior to starting this recipe, use the package manager to install the tree program.

On Fedora, Red Hat, or CentOS, run the following command:

sudo yum install tree

On Debian or Ubuntu, run the following command:

sudo apt-get install tree

How to do it...

  1. Open a terminal window and run the following statements:

    sudo tree -puga /usr/lib*/mysql /lib*/mysql \
      /etc/mysql* /etc/my.cnf* /var/lib*/mysql
    
  2. Stop MariaDB if it is running.

  3. Change the ownership of all files that are not owned by either the root or mysql users to whichever...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete