• Register
1 vote
52 views

Problem :

I am very new to the mysql. I am trying to create the new user in the mysql with below syntax:

create user 'MyUser'@'localhost' identified by 'password';

But I am always facing below error:

“Your password does not satisfy the current policy requirements.”

I have already tried many types of passwords but none of them are working. I am trying to fix the above error from many hours but still no success. Can someone help me in fixing it for me?

8 5 2
3,230 points

Please log in or register to answer this question.

2 Answers

1 vote

Solution :

I am trying to help you as I found your question very interesting.

To fix your this problem you need to execute below command in mysql: 

SHOW VARIABLES LIKE 'validate_password%' 

 When I executed above command I found that my "validate_password_policy" was set to Medium.

The below output is self explanatory. It is for the valid password when the Password policy is set to medium:

The Password must be at least 8 characters long

The Mixed case count is 1 here At least 1 letter in small and 1 letter in caps

The Number count is 1

The Minimum special Character count is 1

So for you a valid password must obey above policy. You can refer below examples of valid password for the above rules:

·  Student@123

·  NINJAcoder@100

·  demoPass@99

You should pick any of the above combination as long as it satisfies your policy.

8 4 1
5,680 points
0 votes

One can set many requirements for password validation. The password policy must have strong otherwise you will get an error “Your password does not satisfy the current policy requirements.” Error when the user tries to set a password in MYSQL.

Where to create a password policy?

The password policy will be created in the MYSQL server, when the validate_plugin is active and this will throw an error message by saying that the password does not satisfy the current policy requirements.

Solutions:

This error can be fixed by three methods.

  • Set the password policy value to low
  • Set the same password policy value in my.cnf file
  • Uninstall the plugin that is used for validating a password.

Set the password policy to low:

The default password level of the plugin can be changed at runtime or by using a config file. For this purpose, the default authentication plugin has to be checked.

SHOW VARIABLES LIKE ‘default authentication plugin’;

For checking the current variables for password validation, run the following command.

SHOW VARIABLES LIKE ‘validate_password%’;

Validate_password is a variable that is used to inform the server about the validate_password plugin. This plugin tests the passwords and improves security.

Policies in validate_password_policy:

There are three policies in Validate_password_policy. The policies are used to define the strength of the password. The default policy will be Medium and the value is changed to Low which has the password length of a minimum of 8 characters. It is only used to check the length of the password. Password policy is set by using the following command;

SET GLOBAL validate_password_policy = LOW

 

11 5 2
3,890 points

Related questions

0 votes
1 answer 1 view
1 view
Problem: I want to create a new user in mysql with syntax: create user 'demo'@'localhost' identified by 'password'; But it returns an error: Your password does not satisfy the current policy requirements. I have tried many passwords but they don't work. How can I fix this?
asked Apr 26 ochena 23.3k points
0 votes
1 answer 4 views
4 views
Problem: I have tried many passwords but they don't work. How can I fix this?
asked Apr 28 salim1 60.6k points
0 votes
1 answer 5 views
5 views
your password does not satisfy the current policy requirements
asked Feb 16 ArifulIslam 7.5k points
0 votes
1 answer 1 view
1 view
Problem: Please help me >How to reset the root password in the mysql reference manual?
asked 11 hours ago Rada Gracelynn 1.8k points
0 votes
1 answer 6 views
6 views
Problem: I am trying to change the MySql root password. How can I change password, which does not exist? Please HELP! Thanks!
asked Mar 16 ummesalma 29.2k points
0 votes
1 answer 4 views
4 views
Problem: it gives me this error: “The specified network password is not correct.” exception when changing a users password How can I make it work?
asked Mar 20 ummesalma 29.2k points
0 votes
1 answer 4 views
4 views
Problem: Hi I am facing this poblem can any body help? column 'id' in where clause is ambiguous
asked Mar 20 PkGuy 23.5k points
0 votes
0 answers 3 views
3 views
Problem: Hi ! can some one help me please with this issue: column in field list is ambiguous
asked Mar 20 PkGuy 23.5k points
0 votes
1 answer 2 views
2 views
Problem: Son of my collegue accidently created new user account in windows 8.1 and set it as admin. He also set password which of course doesn't know now. Is there any chance how to reset this password from guest account? Any software from third part or live linux? Thank you for helping I tried some commands in cmd, but everything finished of course on admin permissions.
asked 4 days ago anika11 32.2k points
0 votes
1 answer 4 views
4 views
Problem: Son of my collegue accidently created new user account in windows 8.1 and set it as admin. He also set password which of course doesn't know now. Is there any chance how to reset this password from guest account? Any software from third part or live linux?
asked 6 days ago sumaiya simi 43.9k points