Bobcares

MySQL error 1819 – Resolve it now

by | Mar 1, 2021

Usually, we come across ‘MySQL error 1819’ while creating a MySQL user with a relatively weak password.

Technically, this is not an error. Instead, it is a notification that says we are using a password that does not meet the recommended password policy requirements.

Here at Bobcares, we often receive requests to resolve the MySQL errors as a part of our Server Management Services for web hosts and online service providers.

Today, let us see how efficiently our Support Engineers fix this MySQL error.

 

Know more about the MySQL error 1819 (HY000)

This error means that we are using a weak password.

For example, when creating a user, this error occurred.

mysql> create user ‘bob’@’localhost’ IDENTIFIED BY ‘mypassword’;

Here the password is extremely weak and can present a security risk.

The MySQL database ships with a validate_password plugin which when enabled, enforces a password validation policy. The plugin enforces 3 levels of a password validation policy. They are:

  • LOW: Allows users to set a password of 8 or fewer characters.
  • MEDIUM: Allows users to set a password of 8 or fewer characters with mixed cases and special characters.
  • STRONG: Allows users to set a password that has all the attributes of a medium-level password with the inclusion of a dictionary file.

The password policy is set to MEDIUM by default. We run the below command to confirm the password policy level.

$ SHOW VARIABLES LIKE ‘validate_password%’;

In case, if we run the command and get the output empty set, then the plugin is not enabled yet.

In order to enable the plugin, we run the below commands.

mysql> select plugin_name, plugin_status from information_schema.plugins where plugin_name like ‘validate%’;
mysql> install plugin validate_password soname ‘validate_password.so’;

Then, to confirm the activation of the plugin, we run the below command.

mysql> select plugin_name, plugin_status from information_schema.plugins where plugin_name like ‘validate%’;

 

How to fix MySQL error 1819 (HY000) in Linux

Now let’s take a look at how our Support Engineers resolve this error message.

In order to resolve this error message, we set the password validation policy to the lowest level. In return, this will create an avenue for setting weak passwords which can ultimately cause our database to be compromised by hackers.

Here are the steps to change the MySQL Password Validation Policy

First, we set a lower password validation policy.

mysql> SET GLOBAL validate_password_policy=LOW;

OR

mysql> SET GLOBAL validate_password_policy=0;

Then we can confirm the password validation policy level.

$ SHOW VARIABLES LIKE ‘validate_password%’;

Now we can proceed and assign a relatively weak password as per our wish.

mysql> create user ‘bob’@’localhost’ IDENTIFIED BY ‘mypassword’;

If we want to revert to the ‘MEDIUM’ password policy level, then we can run the below command.

mysql> SET GLOBAL validate_password_policy=MEDIUM;

In case, if the password policy doesn’t change then we exit from the MySQL prompt and restart the MysqL service from Terminal window.

$ sudo systemctl restart mysql

Disable password validation policy

If we want to create users with weak password, we simply disable the Validate Password component altogether and re-enable it back after creating the users.

We run the below command to log into the MySQL server:

$ mysql -u root -p

We run the following command to temporarily disable Validate Password component.

mysql> UNINSTALL COMPONENT “file://component_validate_password”;

Then we create the users with any password.

mysql> create user ‘kumar’@’localhost’ identified by ‘123456’;

After that, we enable the Validate Password component. For that, we run the below command.

mysql> INSTALL COMPONENT “file://component_validate_password”;

[Need any further assistance in fixing MySQL error? – We’ll help you]

 

Conclusion

In short, this MySQL error occurs while creating a MySQL user with a relatively weak password. Today, we saw how our Support Engineers fix this MySQL error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF