MySQL 8.0 调整密码验证规则(改为可以设置简单密码):
set global validate_password.policy=0;
set global validate_password.length=1;
create database sbtest;
CREATE USER 'admin'@'%' IDENTIFIED BY 'admin888';
GRANT ALL ON *.* TO 'tony'@'%';
flush privileges;
FATAL: unable to connect to MySQL server on host '127.0.0.1', port 3306, aborting...
FATAL: error 2059: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
FATAL: `sysbench.cmdline.call_command' function failed: /usr/share/sysbench/oltp_common.lua:83: connection creation faile
sysbench 测试OLTP报上面错误,FATAL: error 2059: Authentication plugin 'caching_sha2_password' cannot be loaded:
认证组件“caching_sha2_password”没有被加载,查了一下资料,
原来在mysql8以后,用户连接默认认证组件改为“caching_sha2_password”,
而mysql5.7以前,默认的用户认证组件为“mysql_native_password”。
ALTER USER admin IDENTIFIED WITH mysql_native_password; #这一步会把密码清空
alter user 'admin'@'%' identified with mysql_native_password by 'admin888';
flush privileges;
运行:
sysbench
|