MySQL8.0还原MySQL5.7的备份
还原备份过程中发现有几个函数并没有还原到,原因是MySQL8.0进行了一些限制。需要执行下面语句后,才可以把所有函数还原:
set global log_bin_trust_function_creators=TRUE;
Java创建mysql之后被外界拒绝访问
MySQL8以下版本可以通过下面语句进行授权:
grant all privileges on *.* to root@"%" identified by ".";
但在MySQL8中已经不支持grant all privileges on . to ‘root’@‘%’ identified by ‘密码’ with grant option这种写法。
需要按照步骤执行代码即可:
create user 'root'@'%' identified by '.';
grant all privileges on *.* to 'root'@'%';
flush privileges;