mysql grant all privileges on
遇到了 SQLException: access denied for @'localhost' (using password: no)
解决办法 grant all privileges on *.* to joe@localhost identified by '1';
flush privileges;
拿 joe 1 登陆
附:
mysql> grant 权限1,权限2,…权限n on 数据库名称.表名称 to 用户名@用户地址 identified by ‘连接口令’;
权限1,权限2,…权限n代表select,insert,update,delete,create,drop,index,alter,grant,references,reload,shutdown,process,file等14个权限。
当权限1,权限2,…权限n被all privileges或者all代替,表示赋予用户全部权限。
当数据库名称.表名称被*.*代替,表示赋予用户操作服务器上所有数据库所有表的权限。
用户地址可以是localhost,也可以是ip地址、机器名字、域名。也可以用’%'表示从任何地址连接。
‘连接口令’不能为空,否则创建失败。
mysql>grant select,insert,update,delete,create,drop on vtdc.employee to joe@10.163.225.87 identified by ‘123′;
给来自10.163.225.87的用户joe分配可对数据库vtdc的employee表进行select,insert,update,delete,create,drop等操作的权限,并设定口令为123。
mysql>grant all privileges on vtdc.* to joe@10.163.225.87 identified by ‘123′;
给来自10.163.225.87的用户joe分配可对数据库vtdc所有表进行所有操作的权限,并设定口令为123。
mysql>grant all privileges on *.* to joe@10.163.225.87 identified by ‘123′;
给来自10.163.225.87的用户joe分配可对所有数据库的所有表进行所有操作的权限,并设定口令为123。
mysql>grant all privileges on *.* to joe@localhost identified by ‘123′;
给本机用户joe分配可对所有数据库的所有表进行所有操作的权限,并设定口令为123。
最新文章
- 死去活来,而不变质:Domain Model(领域模型) 和 EntityFramework 如何正确进行对象关系映射?
- VMware Workstation and Hyper-V are not compatible. 解决方案
- React的双向绑定
- [leetcode]Path Sum II
- TCP和UDP的聊天
- [转]Oracle分页之三:利用PagerView来实现无刷新GridView
- git workflow常用命令
- easy ui tree 取复选框打勾的值
- fafu 1100 线段树
- JQuery Datatable Ajax请求两次问题的解决
- AngularJS html5Mode与ASP.NET MVC路由
- mysql5.7安装教程
- vue项目架构
- 共享MFC自绘Listctrl代码
- J2EE进阶(九)org.hibernate.LazyInitializationException: could not initialize proxy - no Session
- css引用与html语义化
- LayaAir疑难杂症之三:1.7版本click()、execCommand('copy')函数不生效
- 公开课 之 tony 电子时钟 (课堂笔记)
- DACLs and ACEs
- curl发送xml , xml和数组互转
热门文章
- Spring4分别整合mongo2.X和3.0
- 使用HTML5中的Canves标签制作时钟特效
- U盘装系统系列三—-ghost系统安装教程
- Android再学习-便签开发小结-20141119
- pyqt5按钮计数
- JDBC开发模式
- cf C. Valera and Elections
- fuck WPFG.org
- VS2010安装与测试编译问题(fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt)
- Linux tr 命令使用