1.创建用户pig
CREATE USER 'pig'@'%' IDENTIFIED BY '123456';
2.授权
GRANT ALL ON *.* TO 'pig'@'%';
3.授权某个数据库给用户
GRANT ALL ON testdb.* TO 'user10'@'%';
CREATE USER 'pig'@'%' IDENTIFIED BY '123456';
GRANT ALL ON *.* TO 'pig'@'%';
GRANT ALL ON testdb.* TO 'user10'@'%';