SQL之DCL(管理用户.权限)

SQL学习(七)--DCL(定义数据库的访问权限和安全级别,及创建用户) 本地本地。 阅读详情

SQL之DCL(管理用户.权限)

管理用户:

1.添加用户
2.删除用户
3.修改密码
  (修改root密码、修改普通用户密码)
4.查询用户

1.添加用户

CREATE USER '用户名'@'主机名' IDENTIFIED BY '密码';
-- localhost:当前主机 、% 任意主机
举例:
	CREATE USER 'xiaohong'@'localhost' IDENTIFIED BY '123';
	CREATE USER 'xiaoli'@'%' IDENTIFIED BY '123';

2.删除用户

drop user '用户名'@'主机名';
举例:
	DROP USER 'xiaoli'@'%';

3.修改密码

1.修改普通用户密码:
	
5.0:
	update user set password = password('新密码') where user = '用户名';
	set password for '用户名'@'主机名' = password('新密码');	
	
	UPDATE USER SET PASSWORD = PASSWORD("456") WHERE USER = 'zhangsan';
	set password for 'zhangsan'@'localhost' = password('456');

8.0:
	ALTER USER '用户名'@'主机名' IDENTIFIED WITH mysql_native_password BY '新密码';
	
	ALTER USER 'zhangsan'@'localhost' IDENTIFIED WITH mysql_native_password BY '456';

2.修改root用户密码:
	已知原密码:
		
		ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
		
	忘记原密码:
第14讲:DCL类型的SQL语句之用户管理 DCL类型的SQL语言全称为Data Control Language,中文名称为数据控制语言,主要是用来创建数据库的用户和管理用户对数据库的访问权限的。例如在数据库中有itjiang和ithong两个用户,itjiang用户拥有对数据库A以及数据库C的操作权限,ithong用户拥有对数据库B的操作权限,这种数据库用户管理的SQL语句就是DCL类型。 阅读详情

相关推荐

手把手教你用WF100DPZ数字压力传感器搞定I2C/SPI通信(附完整寄存器解析)

本文详细解析了WF100DPZ数字压力传感器的I2C与SPI通信驱动方法,涵盖硬件连接、寄存器配置、数据读取流程及常见问题排查。该传感器内置24位ADC和出厂校准,通过实战代码演示了如何稳定获取高精度压力与温度数据,帮助开发者快速集成到嵌入式项目中。

weixin_28285943的博客 375

告别爆显存!手把手教你为ComfyUI+华为Atlas 300I Duo配置wan2.1视频生成工作流(含CPU-VAE参数)

本文详细介绍了华为Atlas 300I Duo与ComfyUI的深度适配实战,重点优化wan2.1视频生成工作流。从硬件散热改造到软件栈配置,再到ComfyUI专项优化,提供完整的解决方案,显著提升视频生成效率与稳定性,特别适合需要高效文生视频的应用场景。

weixin_26812607的博客 457

AI与运筹学赋能:混合动力公交调度优化算法实战解析

组合优化是运筹学与计算机科学交叉的核心领域,旨在从海量可行方案中寻找最优解,其原理在于通过定义目标函数与约束条件,将复杂现实问题转化为可计算的数学模型。该技术的核心价值在于解决资源受限下的高效分配问题,广泛应用于物流、交通、生产调度等场景。在智慧交通领域,混合动力公交车辆调度正是一个典型的组合优化问题,涉及车辆、班次、充电桩等多重资源与时空约束。本文聚焦于通过贪婪启发式与模拟退火元启发式算法,求解大规模公交网络下的车辆调度与能耗优化方案,旨在实现总能源成本最小化。其中,模拟退火算法通过引入概率性接受劣解的策

weixin_42497762的博客 406

图像配准方法之灰度信息法

这系列文章是5年前的,也是从自己的QQ(632846506)日志中移过来的。https://user.qzone.qq.com/632846506/infocenter。      图像配准的方法主要有三种:基于灰度信息方法;基于空间变换域方法;基于图像特征的方法。 一、灰度信息法。     灰度信息法直接利用两幅图像之间灰度度量的相似性,以图像内部的信息为依据,采用搜索方法寻找相似度最大或

月秀明竹的专栏 1万+

机器人C++开源库The Robotics Library (RL)使用手册(三)

进入VS工程,我们先看看这些功能函数及其依赖库的分布关系:rl命名空间下,主要有八大模块。搞定VS后将逐个拆解。

qq_34839823的博客 1736

声音源定位:利用YOLO与麦克风阵列定位声音来源YOLOv5、YOLOv8、YOLOv10

YOLO(You Only Look Once)是一个用于目标检测的深度学习模型。YOLO的最大特点是其通过一次前向传播即可完成多个目标的检测,速度和精度相对其他目标检测算法具有显著优势。YOLO模型的版本不断更新,从YOLOv1到YOLOv10,算法精度和速度都有了显著的提升。声音源定位是利用多个麦克风阵列收集的声音信号,通过算法计算声音源的位置。声音源定位的关键在于准确估计每个麦克风的声音到达时间,从而确定声音源的空间坐标。基于时延估计(TDOA)

YOLO 672

R语言深度学习实战:基于YOLO的目标检测

目标检测是计算机视觉领域的一项任务,旨在识别图像或视频中的物体,并确定它们的位置。与图像分类不同,目标检测要求模型能够识别多个物体,并为每个物体提供边界框(bounding box)的位置信息。这种任务在众多应用中都具有重要价值,例如自动驾驶、安防监控、物体跟踪等。YOLO(You Only Look Once)是一种非常流行的目标检测算法,它在速度和准确性之间取得了良好的平衡。与传统的目标检测方法不同,YOLO将目标检测任务视为回归问题,直接从输入图像中预测目标的类别和位置信息。

YOLO 330

腾讯音乐 QQ音乐商业化客户端开发工程师:岗位深度解析与面试攻略

腾讯音乐QQ音乐商业化客户端开发工程师岗位要求3年以上Android开发经验,熟练掌握Kotlin/Java及跨端开发技术。核心职责包括QQ音乐客户端功能开发、架构优化、性能提升及技术攻关。岗位要求计算机相关本科以上学历,具备完整项目开发经验,熟悉TCP/IP等网络协议,能独立解决复杂技术问题。面试重点考察项目经验、架构设计、性能优化及新技术研究能力,建议候选人准备具体案例,量化成果,并熟悉Flutter等跨端技术。该职位强调技术深度与产品思维的结合,需展现扎实的编程基础、问题解决能力和团队协作精神。

郑伟强dev的专栏 366

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: SQL之事务
下一篇: JDBC概念和实际连接
Tket
博客等级 码龄9年 21粉丝 114原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值