O'Reilly logo

Building a Web Application with PHP and MariaDB: A Reference Guide by Sai Srinivas Sriparasa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Securing MariaDB

In this section, we will cover a few topics that will help us secure our MariaDB database server. A few issues that we will cover in this section are:

  • Password-protected access
  • Building views to restrict access
  • Creating users and granting access

Password-protected access

During the MariaDB installation process, the user is normally prompted to enter a password for the root user. It is not required to enter a password; users can hit escape to avoid entering a password. As we are trying to secure the installation, let's go over the steps to protect access by adding a password if the password was not added initially. We will use mysqladmin for this process and enter the following command:

mysqladmin –u root password <userpassword>

In ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required