mysql_工作问题_解决方案
1、******
# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
#ln -s /tmp/mysql.sock /var/lib/mysql/
2、******
客户端远程无法登陆 ---》 授权?
mysql> grant all privileges on *.* to 'root'@'%' identified by '1234abcd' with grant option;
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on *.* to 'root'@'%' identified by '1234abcd' with grant option;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
远程端登录测试 ok!
3、******
#vi /etc/my.cnf #sql模式设置为空
sql-mode=""
#systemctl restart mysqld