MYSQL错误
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
service
mysqld start
vim
/etc/my.cnf
[mysqld]
skip-grant-tables
service
mysqld restart
update
user set authentication_string=password("xxxx") where
user='root';
update
user set Host = '%' where user = 'root';
flush
privileges;
quit;
validate_password_policy有以下取值:
| Policy | Tests Performed |
|---|---|
0 or LOW |
Length |
1 or MEDIUM |
Length; numeric, lowercase/uppercase, and special characters |
2 or STRONG |
Length; numeric, lowercase/uppercase, and special characters; dictionary file |
默认是1,即MEDIUM,所以刚开始设置的密码必须符合长度,且必须含有数字,小写或大写字母,特殊字符。
set
global validate_password_policy=0;
set
password=password('xxxx');
select @@validate_password_length;
mysql> SHOW
VARIABLES LIKE 'validate_password%';
+--------------------------------------+-------+
| Variable_name
| Value
|+--------------------------------------+-------+
| validate_password_dictionary_file | |
| validate_password_length
| 6 |
| validate_password_mixed_case_count | 2 |
| validate_password_number_count | 1 |
| validate_password_policy
| LOW |
| validate_password_special_char_count | 1
|+--------------------------------------+-------+

浙公网安备 33010602011771号