0

I have tried something shown below :

SHOW VARIABLES LIKE 'validate_password%';

The output should be something like that :


+--------------------------------------+-------+
| Variable_name                        | Value |
+--------------------------------------+-------+
| validate_password.check_user_name    | ON    |
| validate_password.dictionary_file    |       |
| validate_password.length             | 6     |
| validate_password.mixed_case_count   | 1     |
| validate_password.number_count       | 1     |
| validate_password.policy             | LOW   |
| validate_password.special_char_count | 1     |
+--------------------------------------+-------+

then you can set the password policy level lower, for example:

SET GLOBAL validate_password.length = 6;

SET GLOBAL validate_password.number_count = 0;

The problem is when I set the fields and then restart mysql it again setted to default. I have also tried,

mysql> flush priviledges;

Please help me how can I set the password of my user root to the admin.

Ishmeet Singh
  • 109
  • 1
  • 2
  • 10
  • It is unclear what you are asking. You are describing a problem that you cannot save server variables, but you are asking how to set the password for a user. These are different problems/questions. Do you want to change the password of a user or do you want to know how to set system configuration variables persistently for a MySQL server? – Progman Jun 16 '20 at 08:29
  • Does this answer your question? [MySQL: Setting sql\_mode permanently](https://stackoverflow.com/questions/20373532/mysql-setting-sql-mode-permanently) – Nico Haase Jun 16 '20 at 08:46

1 Answers1

2

You should set up your settings in a configuration file my.cnf.

Check this article for proper path depending on a system you use. https://dev.mysql.com/doc/refman/8.0/en/option-files.html

Jsowa
  • 9,104
  • 5
  • 56
  • 60