How To Install LAMP Stack (Apache, MariaDB, PHP, phpMyAdmin) On openSUSE 13.1/13.2/42.1

3a) Secure MariaDB

By default there is no password for MySQL instant and you need to run the below command to set the root password for security reason but we have set the password in our previous step, so we can bypass for setting root password.

Run mysql_secure_installation command to adjust other settings to make your database more secure such as removing anonymous users, Disallow root login remotely, Remove test database and access & Reload privilege tables.

I strongly recommend user to secure MySQL installation using mysql_secure_installation.

[MariaDB Secure installation]
$ sudo mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

Enter current password for root (enter for none): Enter Your Current Password
OK, successfully used password, moving on...

Set root password? [Y/n] n
... skipping.

Remove anonymous users? [Y/n] y
 ... Success!

Disallow root login remotely? [Y/n] y
 ... Success!

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

how-to-install-lamp-stack-on-opensuse-42-1-image-6

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...