咨询热线:4006-75-4006

售前:9:00-23:30    备案:9:00-18:00    技术:7*24h

如何使用命令创建mysql用户

2017-04-18 23:18:17 11114次

在没有工具的时候怎样用命令创建mysql用户和把用户授权给对应的数据库.

>create database db_name;

>create user user_name'@'localhostidentified by password;

>grant all privileges on db_name.* to user_name@localhost;

>flush privileges;

>exit;

删除用户和数据库:

>drop user user_name@localhost;                                       

>delete database db_name;


首页
最新活动
个人中心