具体方法:
(推荐教程:MySQL教程)
1、打开命令提示符,进入到 mysql 的安装目录下
2、使用root用户登录数据库
E:\mysql-5.6.14-winx64\bin>mysql -uroot -p
3、创建用户
create user'用户名'@'localhost'identified by '密码';
4、给予权限 GRANT ALL ON *.* TO 'rsm'@'%';
grant all on *.* to 'jsyl'@'localhost'; grant all privileges on *.* to 'root'@'%' identified by 'root'; (%) 表示所有ip
执行完上述命令后用下面的命令刷新权限
flush privileges;
5、退出,检验,新用户重新登录
E:\mysql-5.6.14-winx64\bin>mysql -ujsyl -p Enter password: ********* Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 36