当前位置:网站首页>MySQL differential deletion and modification check user login and password modification
MySQL differential deletion and modification check user login and password modification
2022-07-19 02:47:00 【For whom do the stars change】
1、 Sign in MySQL database
netstat -anpt | grep mysqld ( Check the port )
mysql -u root ( Password-free login )
mysql -u root -p ( Login with password )2、 view the database
show databases; (; The end of the statement )
( The following is the display )
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.10 sec)3、 View which tables are in the currently used library
use mysql; ( Switch to MySQL database )
show tables; ( See the table )
describe user; ( View the structure of the table )
select * from Table name ( View all data )4、 Create libraries and tables
(1) Create a library
create database benet; ( establish benet database )
( The following is the display )
Query OK, 1 row affected (0.00 sec)
(2) Create table
Create a new table
CREATE TABLE Table name ( Field 1 name type , Field 2 name type ,...,);
( The following are examples )
create table student (xuehao int,xingming char(20),xingbie char(4));5、 Insert and delete and change
(1) Insert
INSERT INTO Table name ( Field 1, Field 2,…)VALUES( Field 1 Value , Field 2 Value ,…)
( give an example )
insert into student (xuehao,xingming,xingbie) values('1','zhangsan','nan');(2) Delete
Delete a database
DROP DATABASE Database name
Delete a table in a database
DROP TABLE Database name . Table name ;
Delete a piece of data of a table in a database
delete from Table name where Conditions (3) change
Modifying data
update Table name set Name =' value ' where Conditions ;
6、 Set user permissions
(1) Create database users
grant Permission list on Database name . Table name to user name @ Source address identified by ' password ';
remarks :
Permission list :select( View permissions ) insert( Insert permissions ) update( Change permissions ) all( All permissions )
Source address : 192.168.1.10 ( Represents a host )
192.168.1.% ( Represents a network segment )
localhost ( Indicating the machine )
If there is no user, the user is automatically created (2) Revoke user privileges
revoke Permission list on Database name . Table name from user name @ Address source (3) View user permissions
show grants for user name @ Address source 边栏推荐
- Cocoon breaking and rebirth of 3D NFT: caduceus decentralized edge rendering technology
- MySQL差删改查用户登录修改密码
- [unity development tips] unity mixer mixer controls global volume
- Shell脚本整数值比较、逻辑测试、if语句、提取性能监控指标
- Subnet division (see details)
- Post man JSON script to JMX script of JMeter
- Shortest circuit / secondary short circuit /k short circuit
- Full link voltage measurement
- Longest ascending subsequence - Optimization
- Use JMeter to test services based on websocket protocol
猜你喜欢

Zabbix6.0监控vCenter7.0

Use of sqlmap

Leetcode buckle classic topic - 82 Maximum rectangle in column chart

DNS domain name resolution

Metersphere is based on JMeter distributed performance pressure testing platform

Network layer transmission protocol (detailed)

In depth performance test data analysis

Interpretation of concurrent virtual users, RPS and TPS

Flask template injection

PXE自动化安装
随机推荐
正则表达式
Chapter 1 - multi agent system
This article only commemorates the modulus of negative numbers
Various development tools
RHCE-ansible第二次作业
10.系统安全及应用
NAT综合实验
Static routing (detailed)
PXE automated installation
安装软件提示无法定位程序输入点AddDllDirectory于动态链接库Kernel32.dll上(文末有下载地址)
VLAN and trunk port configuration
学习网络基础
Leetcode 198:House Robber
Next array - circular section
DNS域名解析
HCIA第一次静态路由实验
MDK Keil/ARM printf 用法说明
The solution to the bounce and offset of unity3d game characters when jumping to the ground
Circular statements and functions of shell scripts
Bladex - a well-designed microservice architecture