怎么在Linux下使用mysql添加mysql用户,需要每一个用户指定一个库?
3个回答
展开全部
部署个phpMyadmin 然后用ie就可以直接操作了
linux下 用root登录mysql
ROOT 下
sql>CREATE USER 'AAA'@'%' IDENTIFIED BY '123';
sql>GRANT USAGE ON * . * TO 'AAA'@'%' IDENTIFIED BY '123' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
sql>CREATE DATABASE IF NOT EXISTS `AAA` ;
sql>GRANT ALL PRIVILEGES ON `AAA` . * TO 'AAA'@'%';
linux下 用root登录mysql
ROOT 下
sql>CREATE USER 'AAA'@'%' IDENTIFIED BY '123';
sql>GRANT USAGE ON * . * TO 'AAA'@'%' IDENTIFIED BY '123' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
sql>CREATE DATABASE IF NOT EXISTS `AAA` ;
sql>GRANT ALL PRIVILEGES ON `AAA` . * TO 'AAA'@'%';
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |