mysql创建数据库和用户

create database sonar character set utf8 collate utf8_general_ci;

flush privileges;

grant all privileges on sonar.* to 'sonar'@'%'identified by 'sonar' with grant option;

flush privileges;

原文地址:https://www.cnblogs.com/ivan0626/p/7016602.html