当前位置:网站首页>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 .
边栏推荐
- SVN version management in use replacement release and connection reset
- How to find the literature of a foreign language journal?
- Abnova 体外转录 mRNA工作流程和加帽方法介绍
- 软件测试到了35岁,真的就干不动了吗?
- Postgresql中procedure支持事务语法(实例&分析)
- LM small programmable controller software (based on CoDeSys) Note 23: conversion of relative coordinates of servo motor operation (stepping motor) to absolute coordinates
- 毕业设计游戏商城
- 地质学类比较有名的外文期刊有哪些?
- 【mysqld】Can't create/write to file
- Force deduction 62 different paths (the number of all paths from the upper left to the lower right of the matrix) (dynamic planning)
猜你喜欢
拼多多败诉:“砍价免费拿”侵犯知情权但不构成欺诈,被判赔400元
场馆怎么做体育培训?
Linear algebra (1)
Apache ab 压力测试
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第二阶段答案
SolidWorks GB Library (steel profile library, including aluminum profile, aluminum tube and other structures) installation and use tutorial (generating aluminum profile as an example)
联合索引ABC的几种索引利用情况
Leetcode T1165: 日志分析
MySQL的主从复制原理
程序员的日常 | 每日趣闻
随机推荐
JWT certification
Leetcode T1165: 日志分析
MySQL installation
数据资产管理与数据安全国内外最新趋势
JWT的基础介绍
mysql查看bin log 并恢复数据
Unity C# 函数笔记
【NOI模拟赛】区域划分(结论,构造)
Take you to brush (niuke.com) C language hundred questions (the first day)
sqlserver多线程查询问题
肿瘤免疫治疗研究丨ProSci LAG3抗体解决方案
Comment les entreprises gèrent - elles les données? Partager les leçons tirées des quatre aspects de la gouvernance des données
Abnova循环肿瘤DNA丨全血分离,基因组DNA萃取分析
Bus消息总线
什么情况下考虑分库分表
2022 Android interview essential knowledge points, a comprehensive summary
JESD204B时钟网络
根据IP获取地市
剑指offer-高质量的代码
Postgresql源码(59)分析事务ID分配、溢出判断方法