mysql 8.0 以上的创建用户与授权
CREATE USER 'testaccount'@'%' IDENTIFIED BY '1qaz@WSX';
GRANT ALL privileges ON cloud_chart.* TO 'testaccount'@'%';
flush privileges;
-- 修改远程连接用户的加密规则
先给root赋权
grant system_user on *.* to 'root';
ALTER USER 'testaccount'@'%' IDENTIFIED WITH mysql_native_password BY '1qaz@WSX';