平淡人生

静待花开,花开常有香相伴;倾听流水,流水总有乐相陪;有缘清风携舟涉碧水,无缘细雨伴君独自行。

FreeBSD 8.0下Mysql5.5创建数据库及所属用户

创建数据库名为kiccleaf

CREATE DATABASE `kiccleaf` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

创建用户并赋予相应数据库权限,创建用户名kiccleaf

CREATE USER ‘kiccleaf’@’%’ IDENTIFIED BY ‘***’;

GRANT USAGE ON * . * TO ‘kiccleaf’@’%’ IDENTIFIED BY ‘***’ WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

添加数据库kiccleaf所属管理用户kiccleaf

GRANT ALL PRIVILEGES ON `kiccleaf` . * TO ‘kiccleaf’@’%’;

如果有必要可以编辑权限

REVOKE ALL PRIVILEGES ON `kiccleaf` . * FROM ‘kiccleaf’@’%’;

GRANT ALL PRIVILEGES ON `kiccleaf` . * TO ‘kiccleaf’@’%’;


Categorised as: FreeBSD技术