I am using RHEL 7, which includes MariaDB 5.5.

I want to set up minimum requirements for passwords: minimums length 15, 1 lowercase, 1 uppercase, 1 symbol, 1 number.

I figure that I am probably not the first person using Rhel 7 to face this problem. Does anyone have some guidance on the best approach to add the above password rules to MariaDB 5.5 under Rhel 7?

I have so far pieced together these facts. (Some I am not so sure are correct.) I believe these facts indicate my best option is to just do whatever 5.5. allows.

  • MariaDB 5.5 doesn't do this. There is no plugin.
  • MariaDB 5.7 introduced new password features.
  • MariaDB 10.1 and later has password plugin with this functionality.
  • Installing an updated MariaDB on Rhel 7 would requiring making my own RPM and possibly put the system security at risk.
  • I could write my own password routines and put them in the database. But this is not recommended, because it is easy to introduce a security flaw.
  • I can configure 5.5 to work with Linux's PAM, or use the standard linux-user-name-matches-the-mysql-account-name authentication.

1 Answer 1


A couple of comments:

  • Re: "the standard linux-user-name-matches-the-mysql-account-name authentication" - I assume you mean using the unix_socket plugin for authentication. This only works on localhost, i.e. the user has to be logged in on the database server.
  • There is no MariaDB 5.7, but there is however a MySQL 5.7.
  • There is no need to build your own RPM for MariaDB 10.x on RHEL7. You can just add the relevant MariaDB 10.x .repo file to your /etc/yum.repos.d/ directory. You can use the repo config tool on mariadb.org.

It's up to you to decide whether it's worth the effort to upgrade to MariaDB 10.1+ and thereby be able to use the password checking plugins - simple_password_check and cracklib_password_check. (10.4 is now GA, though at the moment this is still relatively new, so you may want to consider 10.3 or older as a more stable release.)

  • +1 Apparently I am a plebe here and I can't upvote :(
    – BAMF4bacon
    Commented Aug 12, 2019 at 17:34
  • @BAMF4bacon I upvoted for you.
    – msanford
    Commented Sep 6, 2022 at 22:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.