ITPub博客

首页 > 数据库 > MySQL > mysql创建数据库及用户办法

mysql创建数据库及用户办法

原创 MySQL 作者:laojiangjiji 时间:2014-09-25 20:13:47 0 删除 编辑
laojiang:~ # mysql -uroot -proot
mysql> create database laojiang character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on laojiang.* to 'laojiang'@'%' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on laojiang.* to 'laojiang'@'127.0.0.1' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on laojiang.* to 'laojiang'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on laojiang.* to 'laojiang'@'laojiang' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
mysql> grant select on mysql.proc to laojiang;
Query OK, 0 rows affected (0.00 sec)
mysql> grant show databases on *.* to  laojiang;
Query OK, 0 rows affected (0.00 sec)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29911917/viewspace-1280953/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: mysql安装办法
请登录后发表评论 登录
全部评论

注册时间:2014-09-23

  • 博文量
    35
  • 访问量
    48739