当前位置:网站首页>MySQL user permissions
MySQL user permissions
2022-07-07 06:51:00 【Q z1997】
1.1 Sign in MYSQL:
@>mysql -u root -p
@> password
1.2 Create user :
Format :grant select on database .* to user name @ Log on to the host identified by ‘ password ’
give an example :
example 1: Add a user test1 The password for abc, Let him log on to any host , And for all databases
Inquire about 、 Insert 、 modify 、 Delete permissions . First of all, it is used to root User connection MySQL, Then type the following command :
grant select,insert,update,delete on . to [email protected] identified by ‘mysql’;
grant select,insert,update,delete on test_p.* to 'qz1997'@'%' identified by 'qz1997';
perhaps
grant all privileges on . to [email protected] identified by ‘mysql’;
Then refresh the permission settings .
flush privileges;
example 2: If you don't want to root There is a password to operate the database “mydb” The data table in , You can type another command to erase the password .
grant select,insert,update,delete on mydb.* to [email protected] identified by ‘’;
# Be careful : Here "localhost", It means that the user can only log in locally , Can't log in remotely on another machine .
If you want to log in remotely , take "localhost" Change it to "%",
It means that you can log in to any computer . You can also specify that a machine can log in remotely .
边栏推荐
- RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)`问题解决
- Leetcode T1165: 日志分析
- Install mongodb database
- BindingException 异常(报错)处理
- MATLAB小技巧(30)非线性拟合 lsqcurefit
- Redhat5 installing vmware tools under virtual machine
- Installing redis and windows extension method under win system
- Google Chrome browser released patch 103.0.5060.114 to fix the 0-day vulnerability
- 请教一个问题,flink oracle cdc,读取一个没有更新操作的表,隔十几秒就重复读取全量数据
- Overview of FlexRay communication protocol
猜你喜欢

Etcd database source code analysis -- starting from the start function of raftnode
![[opencv] morphological filtering (2): open operation, morphological gradient, top hat, black hat](/img/45/f3b960e3c56f50674b0e6374cba705.png)
[opencv] morphological filtering (2): open operation, morphological gradient, top hat, black hat

Cloudcompare point pair selection

The difference between string constants and string objects when allocating memory

循环肿瘤细胞——Abnova 解决方案来啦

What books can greatly improve programming ideas and abilities?

This article introduces you to the characteristics, purposes and basic function examples of static routing
![[start from scratch] detailed process of deploying yolov5 in win10 system (CPU, no GPU)](/img/77/bd80ed602208be6a9ef8be60c6ad06.png)
[start from scratch] detailed process of deploying yolov5 in win10 system (CPU, no GPU)

联合索引ABC的几种索引利用情况

途家、木鸟、美团……民宿暑期战事将起
随机推荐
Install mongodb database
二十岁的我4面拿到字节跳动offer,至今不敢相信
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书
软件测试到了35岁,真的就干不动了吗?
什么情况下考虑分库分表
String (explanation)
拼多多败诉:“砍价免费拿”侵犯知情权但不构成欺诈,被判赔400元
How to install swoole under window
多个kubernetes集群如何实现共享同一个存储
Several index utilization of joint index ABC
mobx 知识点集合案例(快速入门)
化工园区危化品企业安全风险智能化管控平台建设四大目标
分布式id解决方案
MATLAB小技巧(30)非线性拟合 lsqcurefit
MOS tube parameters μ A method of Cox
Stack and queue-p79-10 [2014 unified examination real question]
Matlab / envi principal component analysis implementation and result analysis
FPGA课程:JESD204B的应用场景(干货分享)
Under what circumstances should we consider sub database and sub table
Tkinter window selects PCD file and displays point cloud (open3d)