先创建数据库 创建用户并赋予一个数据库的所有权限 use mysql; create database databaseName character set utf8; grant all privileges on databaseName.* to username@'ip' identified by 'password'; 举例: use mysql; create database test_db character set utf8; grant all privileges on…
Mysql添加用户使用可以对mysql数据库用户表有操作权限的用户名登陆mysqlinsert into user(Host,User,Password) values('%','name','password');如果work用户没有登陆权限,则killall mysqldshare/mysql/mysql.server startgrant all on *.* to work@'%' identified by "password"; MySQL赋予用户权限的命令的简单格式为gr…