廊坊网站建设多少钱,深圳营销型网站定制,龙邦建设股份有限公司网站,有哪些网站建设公司先看一下我原本的mysql当中的user里面的数据库
基本语法
1.查询用户
use mysql;
select * from user;
2.创建用户
create user 用户名主机名 identified by 密码;例1:创建用户 itcast, 只能够在当前主机localhost访问, 密码123456;
cr…
先看一下我原本的mysql当中的user里面的数据库
基本语法
1.查询用户
use mysql;
select * from user;
2.创建用户
create user '用户名'@'主机名' identified by '密码';
例1:创建用户 itcast, 只能够在当前主机localhost访问, 密码123456;
create user 'itcast'@'localhost' identified by '123456';
例2:创建用户heima,可以在任意主机访问该数据库,密码123456;
create user 'heima'@'%' identified by '123456';
3.修改用户密码
alter user '用户名'@'主机名' identified with mysql_native_password by '新密码';
例3: 修改用户heima的访问密码1234;
alter user 'heima'@'%' identified with mysql_native_password by '1234';