mysql远程登陆

基于Tkinter制作的GUI连接MySQL数据库实现远程登陆功能 前几天我用 Pyinstaller打包Tkinter创建的GUI应用程序之后,考虑到软件如果被传播导致滥用,不如添加一个账号登陆功能,这样能够有效限制使用者。本文将之前做好的GUI远程连接MySQL数据库,实现远程账户登陆。 目录 1 搭建MySQL环境 1.1 MySQL下载及安装 1.2 远程MySQL数据库配置 1.3 MySQL使用的IDE(Navicat)安装及使用 2.登陆... 阅读详情

mysql登录方式有两种,一种是本机登录,一种是远程登录。这两种登录方式在mysql数据库的user表中都有体现。

由于我们不可能总是本地登录,因此需要设置远程登陆。但是mysql默认不支持远程登陆,所以需要设置一波。

1. 登录数据库。

2. 切换到mysql数据库。

3. 查看主机和用户对应情况,其实就是查看mysql数据库的user表中的部分信息。

 

4. 此时,针对远程用户,我们有三种授权方式: 
1) 授权法(推荐使用)
* 授权给所有ip
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'youpassword' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;

* 授权给某ip
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'your ip' IDENTIFIED BY 'youpassword' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;

2) 改表法(不推荐)
mysql>update user set host = '%' where user = 'root';
mysql>FLUSH PRIVILEGES;
此方法不推荐的原因是,它会把数据库表全部改掉,如果你从本地登录时,看到的数据库结构和远程登陆看到的结构不一样,不利于本地修改。非常不推荐这种玩法!!!

3)修改mysql配置文件
找到mysql.cnf
把bind-address = 127.0.0.1 前面加上 #
即 #bind-address = 127.0.0.1
不过,就rpm安装方式来说,我没找到bind-address这一项;如果有这一项的话,将其修改为bind-address=0.0.0.0也可以实现远程登陆,不过要重启mysql服务。

还有一点,就是你要保证防火墙不会挡住mysql监听端口(感觉是废话,但是实际上经常就是防火墙问题o_o)

systemctl stop firewalld

我的电脑照上述方法配置后,还是无法连接,关闭防火墙后就可以连接了。

redhat linux6.5下载安装mysql5.7及开启远程登陆 1.Mysql安装 1.1.下载Mysql安装包 下载MySQL5.7:http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar 1.2.安装 (1)安装前检查服务器是否已安装MySQL,如已安装则将其卸载: rpm -qa|grep mysql >>mysql-libs-... 阅读详情

相关推荐

4-3 MySQL远程连接

直接在本地使用mysqladmin命令登录mysql:mysql 命令表示要启动 MySQL 客户端。-u root:-u 选项指定要使用的用户名。在这里,我们使用 root 用户名作为示例。-p:-p 选项需要用户输入密码。如果省略此选项,则 MySQL 客户端将在不需要密码的情况下以当前用户身份登录。因此,当您使用命令时,您正在尝试使用 root 用户登录到 MySQL 客户端,并提供 root 用户的密码(如果已设置)。

weixin_43263566的博客 4120

mysql开启远程登录

一、登录mysql 登录你的mysql mysql -hlocalhost -uroot -p 如果出现如下,需配置系统环境PATH,mysql的环境的bin目录(如:C:\Program Files\MySQL\MySQL Server 5.6\bin) 二、执行命令 #删除之前配置 drop user 'root'@'%'; #配置远程登录 CREATE USER 'root'@'%' IDENTIFIED BY '你的密码'; GRANT ALL ON *.* TO 'r...

一起coding,一起嗨。 1万+

使用命令行在远程服务器上登录MySQL服务器

在某些情况下,您可能需要通过命令行在远程服务器上登录MySQL服务器来执行各种操作,如查询数据、导入导出数据等。本文将介绍如何使用命令行在远程服务器上登录MySQL服务器,并提供相应的源代码示例。通过命令行在远程服务器上登录MySQL服务器是在大数据领域中进行各种操作的常见方式。在开始之前,确保您已经安装了MySQL客户端工具,并且远程服务器上已经运行了MySQL服务器。输入正确的密码后,您将成功登录到远程MySQL服务器,并可以开始执行各种操作,例如执行SQL查询、创建表、导入导出数据等。

ByteHackerX的博客 1418

mysql远程登录

mysql远程登录

weixin_43730921的博客 1421

CentOS 7.9安装python3.11

CentOS 7.9安装python3.11

leafseelight的专栏 1353

trae使用playwright MCP方法流程

trae使用playwright MCP方法流程

MAILLIBIN的专栏 1686

远程连接MySQL数据库

mysql 远程连接数据库的方法 一、连接远程数据库: 1、显示密码 如:MySQL 连接远程数据库(192.168.5.116),端口“3306”,用户名为“root”,密码“123456” mysql -h 192.168.5.116 -P 3306 -u root -p123456 2、隐藏密码 如:MySQL 连接本地数据库,用户名为“root”, C:/>mysql -h localhost -u root -p 二、配置mysql允许远程链接: 默认情况下,**mysql帐号不允许从远

Sonsay的专栏 11万+

Cadence SIP Layout 简单教程-第一章

以摄像头模组软硬结合板为例,描述layout的整个完整过程,从而掌握基本技能。 第一章 准备工作 第一节 原理图不用说layout前需要绘制原理图,原理图不在本文讨论范围内,所以列为准备工作。 需要特别说明的是,绘制原理的最终目的是导出网络表,网络表中的重要参数footprint是让layout软件选择正确封装的关键,所以这里讲解一下原理图设置footprint的位置。在原理图中双击零件,...

whp1920的博客 1万+

MySQL命令行登陆,远程登陆MySQL

MySQL命令行登陆,远程登陆MySQL

hfdgjhv的博客 1万+

GD32H7实战:5步搞定YOLO轻量化模型部署到MCU(附避坑指南)

本文详细介绍了如何将YOLO轻量化模型部署到GD32H7 MCU的完整实战流程。通过五个关键步骤,涵盖环境搭建、模型训练、格式转换到工程集成,并重点分享了使用GD32AI-ModelZoo工具链进行MCU部署的避坑指南,帮助开发者在资源受限的边缘设备上实现高效目标检测。

weixin_29070861的博客 460

Visual Studio报错TRK0005找不到CL.exe?三步彻底解决环境变量问题

本文详细解析了Visual Studio报错TRK0005找不到CL.exe的根本原因,并提供了三步彻底解决环境变量问题的方案。从验证安装完整性到配置永久环境变量,再到注册表级修复,帮助开发者建立健壮的开发环境配置体系,确保编译链稳定运行。

weixin_30839881的博客 462

mysql 远程登陆

远程登陆 GRANT ALL PRIVILEGES 1. 改表法。可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%" a. mysql -u root -pvmwaremysql>use mysql...

xpmwgcwm的博客 170

AI Agent辅助企业财务分析与预测

企业财务分析与预测是企业管理中至关重要的环节,准确的财务分析与预测能够帮助企业管理者做出明智的决策,合理规划资源,降低风险。然而,传统的财务分析与预测方法往往依赖于人工经验和简单的统计模型,存在效率低、准确性差等问题。随着人工智能技术的飞速发展,AI Agent作为一种智能的软件实体,能够自主地感知环境、做出决策并采取行动,为企业财务分析与预测带来了新的解决方案。

AI天才研究院 933

mysql安装及远程登陆配置删除

mysql 安装及远程登陆配置官网地址Linux安装安装Mysql远程登陆配置删除远程登陆Windows安装 官网地址 Mysql官网下载 在左边的框内寻找自己需要的版本 Linux安装 系统:CentOS 7 安装前,我们先检测系统是否自带mysql rpm -qa | grep mysql 如果你系统有安装,那可以选择进行卸载: rpm -e mysql 准备工具,如果已经安装可以跳...

周凡的博客 444

数据服务:数据服务框架Magic-API 介绍及实践

接口快速开发框架 基于Java的接口快速开发框架,编写接口将通过magic-api提供的UI界面完成,自动映射为HTTP接口,无需定义Controller、Service、Dao、Mapper、XML、VO等Java对象即可完成常见的HTTP API接口开发 。在线页面快速开发平台 基于 vue 的在线页面快速开发平台,主要把所有的 vue 代码都改为在线配置,最终获得一个 json 格式的页面新一代爬虫平台 基于Java实现的新一代爬虫平台,以图形化方式定义爬虫流程,不写代码即可完成爬虫。今天给大家安利一

GIS摆渡人 2078

【Coze搞钱实战】24. 从零实现精准用户画像:Coze+企业微信打造智能导购推送系统(附完整代码)

电商运营中,“客服重复询问用户需求、无法精准推荐”是转化率低的核心痛点——日均200人次咨询,73%的问题是重复的,首单转化率仅14%。本文基于Coze平台sys_uuid用户识别功能、企业微信API与多维表格,打造“用户行为→自动打标→标签存储→智能推送”全链路方案:通过分类分层标签体系捕捉用户偏好,Coze自动识别用户并打标,飞书多维表格存储标签数据,企业微信触发个性化推送。实操后可使客服重复询问率下降62%,意向客户转化率提升81%,首单转化率提升64%。

专注于人工智能、软件开发、工控自动化、工厂数字化及智能化等领域,希望和大家共同进步! 562

【ubuntu】安装mysql,redis开启远程登陆

https://blog.csdn.net/cyz141001/article/details/119028923

wyy7293的博客 712

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

centos8安装MySQL8.0并远程登陆

centos8安装MySQL8.0并远程登陆 1,安装命令:sudo dnf install @mysql 2,设置开机自启:sudo systemctl enable --now mysqld 3,查询MySQL运行状况:sudo systemctl status mysqld.service Active:active (running) 代表安装成功 4,登陆mysql:MySQL -h localhost -P3306(默认) -u root -p password 更改user表进行远

m0_46883233的博客 645

深度学习工具包 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")

数学建模模型总结

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

解决MYSQL不能远程登陆问题

先使用Navicat Premium 15本地登陆MYSQL,然后打开mysql数据库,打开表user,修改如下。确定后,使用查询,写flush privileges;重启一下数据库服务器就可以了。

weixin_45394356的博客 327

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

mysql开启远程登陆权限

as everyone knows,mysql安装之后默认不会开启远程登陆,需要手动授权才能让同一局域网下的计算机访问,今天简单介绍下如果开启。 格式: GRANT ALL PRIVILEGES ON *.* TO '账号(比如root admin 等)'@'%' IDENTIFIED BY '密码(123123,admin,等)' WITH GRANT OPTION; 示例 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'ab

stuild stuil 的博客 2086

centos 6.8 mysql登陆_centos6.8安装mysql并配置远程登陆

1.安装MySQL[root@localhost ~]# wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm[root@localhost ~]# yum install mysql-community-release-el6-5.noarch.rpm[root@localhost ~]# yum install mysq...

weixin_33683833的博客 89

离线安装MySQL并使用Navicat远程登陆连接

自创data,my.ini文件my.ini文件如下敲出MySQL命令行在bin目录下输入命令第一次登陆是不需要密码的,直接输入命令后回车查看MySQL数据库是否安装成功status查看数据库。

m0_49080778的博客 928

mysql8 允许远程登陆

【代码】mysql8 允许远程登陆。

面朝大海,春暖花开 218

mysql开启或关闭远程登陆权限

使用root用户在服务器登陆可以开启或关闭远程登陆权限。 关闭MySQL root用户远程访问权限: use mysql; update user set host = “localhost” where user = “root” and host = “%”; flush privileges; 打开MySQL root用户的远程访问权限: use mysql; update user set...

zhengxiaoya2017的博客 1399

mysql设置root用户远程登陆权限

chengweimam的博客 437

Mysql配置远程登陆

环境:本地windows 10, 远程Ubuntu16.4+Mysql5.7 在win10上远程连接mysql连接不上,首先远端登陆mysql: mysql&gt; show databases; mysql&gt; select user, host,password from mysql.user;  这两步排除数据库名和用户错误,在host部分发现登陆地址限制在了本地   于是创...

MK_chan的博客 671
上一篇: laydate插件回调函数及触发方式
下一篇: mysql 5.6创建新用户并授权指定数据库相应权限
firstcode666
博客等级 码龄5年 53粉丝 20原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址