当前位置:网站首页>MySQL项目8总结
MySQL项目8总结
2022-06-26 09:37:00 【m0_61961898】
添加数据库用户
CREATE USER ‘username’@‘host’ IDENTIFIED BY ‘password’;
username – 你将创建的用户名说明:
host – 指定该用户在哪个主机上可以登陆,如果是本地用户可用localhost, 如 果想让该用户可以从任意远程主机登陆,可以使用通配符%
password – 该用户的登陆密码,密码可以为空,如果为空则该用户可以不需要密码登 陆服务器
给予、回收数据库用户权限
授权
GRANT privileges ON databasename.tablename TO ‘username’@‘host’;
privileges – 用户的操作权限,如SELECT , INSERT , UPDATE 等(详细列表见该文最后面).如果要授予所 的权限则使用ALL说明:
databasename – 数据库名
tablename-表名,如果要授予该用户对所有数据库和表的相应操作权限则可用* 表示, 如*.*
用以上命令授权的用户不能给其它用户授权,如果想让该用户可以授权,用以下命令
GRANT privileges ON databasename.tablename TO ‘username’@‘host’ WITH
GRANT OPTION;
设置与更改用户密码
SET PASSWORD FOR ‘username’@‘host’ = PASSWORD(‘newpassword’);
如果是当前登陆用户用
SET PASSWORD = PASSWORD(“newpassword”);
边栏推荐
- The first batch of 12 enterprises settled in! Opening of the first time-honored product counter in Guangzhou
- 【深度优先搜索】312.戳气球
- Leetcode connected to rainwater series 42 (one dimension) 407 (2D)
- A concise tutorial for getting started with go generics
- LeetCode 0710. Random numbers in the blacklist - preprocessing implementation o (1) value
- Mysql database operation commands (constantly updated)
- Automated testing -- Introduction and example of pytest framework
- A list of common methods for customizing paint and canvas of view
- 自动化测试——pytest框架介绍及示例
- String类intern()方法和字符串常量池
猜你喜欢

A list of common methods for customizing paint and canvas of view

Solution to network request crash in retrofit2.8.1

Detailed explanation of winsorflow quantum installation process

創建對象的時候堆內存的分配

Redis master-slave replication in win10 system

Full introduction to flexboxlayout (Google official flexible implementation of flow layout control)

瑞萨电子面向物联网应用推出完整的智能传感器解决方案

Cmake / set command

定制拦截器

Redis notes (12) - single thread architecture (non blocking IO, multiplexing) and multiple asynchronous threads
随机推荐
Code statistics tools cloc and SCC
WGCLOUD的web ssh服务端口是多少
Leetcode basic calculator 224 227. follow up 394
Appium自动化测试基础 — 移动端测试环境搭建(二)
美国总统签署社区安全法案以应对枪支问题
【无标题】
c语言语法基础之——局部变量及存储类别、全局变量及存储类别、宏定义 学习
Appium automation test foundation - mobile end test environment construction (II)
Automated testing -- Introduction and example of pytest framework
JSP file syntax
Cento7.7 elk installation simple record
瑞萨电子面向物联网应用推出完整的智能传感器解决方案
c语言语法基础之——指针( 多维数组、函数、总结 ) 学习
Extracting public fragments from thymeleaf
[untitled]
字符串常量池、class常量池和运行时常量池
自动化测试——关于unitest与pytest初始化共存问题
The basis of C language grammar -- function definition learning
Day 3 array, pre post, character space, keyword and address pointer
What is the web SSH service port of wgcloud