Introduction

case-of-beer-generic
In terms of visualizing and understanding a database server from a very fundamental level, we can conceptualize it basically as a case of beer. The case represents the server itself, in this case (no pun intended) MariaDB, while the individual bottles inside represent the individual database containers.

shipbottle

There can be many, many individual database containers within a single database server or just a single very large one. When a database container is created, it’s empty, there’s nothing in it and it is essentially of little value. Once we start adding data it becomes more valuable over time due to the time and effort put into filling it, which is often irreplaceable.

Once the database has data, this can be visualized as a sort of “ship in a bottle”, where someone has put great effort into constructing the model and the time and effort is irreplaceable.

Take a look at the official WordPress outline and description of the database tables created during the standard installation.

Install MariaDB using yum with Centos 7, RHEL 7 or Fedora or, alternatively, use the MariaDB Repo Configuration Tool for your distro.


Doing the Work

  1. Install the required packages
  2. yum install mariadb mariadb-server mariadb-bench mariadb-libs
    This should pull all the dependencies you’ll need and install all the packages.

  3. Start the MariaDB service and verify it’s running (note: if you’ve installed MariaDB from the Maria repos, the service will be called “mysql“, if you’ve installed it from the official centos repos, it will be called “mariadb“.
  4. C6: service mysql start
    C6: service mysql status

    Output:
    SUCCESS! MySQL running (24476)

    C7: systemctl start mariadb.service
    C7: systemctl status mariadb.service

    Output:

  5. Login as root to the MariaDB server command line interface.
  6. Delete all users who are not root.
  7. Set root password.
  8. Change root username to something less known.
  9. Removed anonymous (passwordless) access to the database server.
  10. Add a new DBA (Database Administrator).
  11. Create a new database container.
  12. Add a new admin user to a specfic database container only.
  13. Flush privileges

Extra Security

/etc/my.cnf.d/server.cnf/

Last Modified: 11 Jul, 2016 at 10:29:28