set global validate_password_policy=0;
set global validate_password_length=1;
create user 'ngu@%' identified by 'woshiyinyuan';
赋予权限(注意:下面语句有创建用户并赋予权限的作用,所以直接可以用这个创建用户并给予权限)
grant all privileges on test_db.* to 'ngu'@'%' identified by 'woshiyinyuan';
第一次使用create创建完用户后,删除掉用户,第二次使用create创建同名用户时报错:
Operation CREATE USER failed for '666'@'%'
解决办法是直接使用
grant all privileges on test_db.* to '666'@'%' identified by 'woshiyinyuan';
yum安装的MySQL binlog开启了后,默认的文件位置在:
/var/lib/mysql