1、创建数据库
create database `finance` default character set utf8 collate utf8_bin;2、创建用户
#创建mysql用户并制定密码
create user 'finance'@'%' identified by '123456';
#将数据库授权给用户,%表示可以远程访问
grant all privileges on finance.* to 'finance'@'%' with grant option;
flush privileges;
#查看用户
select host, user, authentication_string, plugin from mysql.user;
评论