mysql workbench failed to connect with user root access denied ubuntu

Solutions on MaxInterview for mysql workbench failed to connect with user root access denied ubuntu by the best coders in the world

showing results for - "mysql workbench failed to connect with user root access denied ubuntu"
Fabio
05 Jul 2018
1The solution that worked for me was that
2
3I had to create a new user apart from the root user (in mysql)
4And then created a new db connection with admin as the user & then it worked
5To create  a new user named admin with password as 'password'
6
7commands-
8sudo mysql -u root -p
9CREATE USER 'admin'@'localhost' IDENTIFIED BY 'password';
10GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
11
12if everything works- ENJOY!
13
14At some point if you get an error like 
15'Your password does not satisfy the current policy requirements'
16
17do this-
18(affter starting mysql)
19
20commands-
21SHOW VARIABLES LIKE 'validate_password%';
22
23The output should be something like that :
24+--------------------------------------+-------+
25| Variable_name                        | Value |
26+--------------------------------------+-------+
27| validate_password.check_user_name    | ON    |
28| validate_password.dictionary_file    |       |
29| validate_password.length             | 6     |
30| validate_password.mixed_case_count   | 1     |
31| validate_password.number_count       | 1     |
32| validate_password.policy             | LOW   |
33| validate_password.special_char_count | 1     |
34+--------------------------------------+-------+
35
36
37if not same 
38do this-
39
40SET GLOBAL validate_password.length = 6;
41SET GLOBAL validate_password.number_count = 0;
42
43similarly you can set other fields with the same format
44just change the variable name that is to be set.
45
46DONE!
47THANKS :)
48
49References-
50https://askubuntu.com/questions/773446/unable-to-connect-via-mysql-workbench-to-localhost-in-ubuntu-16-04-passwordless
51https://stackoverflow.com/questions/43094726/your-password-does-not-satisfy-the-current-policy-requirements
52
53
54