E-mail : support@tech2now.in

How to change the Mysql Database password

Mysql

Login to my sql server

connect to Mysql database

mysql

or

mysql -u user -p passwrod

SHOW DATABASES;
+——————–+
| Database |
+——————–+
| information_schema |
| mybar |
| mysql |
| performance_schema |
| sys |
| test |
+——————–+
6 rows in set (0.01 sec)

use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

SHOW VARIABLES LIKE ‘validate_password%’;
+————————————–+————————-+
| Variable_name | Value |
+————————————–+————————-+
| validate_password.check_user_name | ON |
| validate_password.dictionary_file | /opt/mysql/etc/dict.txt |
| validate_password.length | 15 |
| validate_password.mixed_case_count | 1 |
| validate_password.number_count | 1 |
| validate_password.policy | STRONG |
| validate_password.special_char_count | 0 |
+————————————–+————————-+
7 rows in set (0.01 sec)

ALTER USER ‘test’@’localhost’ IDENTIFIED BY ‘daasdadwddfadawqr@12!’;
Query OK, 0 rows affected (0.00 sec)

mysql@czcholstc001198_1 [test]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)