当前位置:网站首页>Local connection to remote server database under Windows platform (I)
Local connection to remote server database under Windows platform (I)
2022-07-27 10:17:00 【Xiang Yu Han】
Continued springboot, After creating users and databases , Let's start writing the remote connection database project , Before realizing remote connection to database , Several aspects need to be certified :
1、 In order to make the remote connection data safe , Created a new one called 【xiaochun】 Users of , And endowed with the right 【spring】 Operation permissions of the database ; reflection : Why not use 【root】 What about user connections ? Then how to manage users ?
2、Spring Boot What is it? ?Spring Boot By Pivotal A new framework from the team , It is designed to simplify the new Spring Initial setup and development of the application . The framework is configured in a specific way , This eliminates the need for developers to define boilerplate configurations .
One 、 Create a remote login user
select * from information_schema.user_privileges;
Show all users ;
drop user 'xiaochun'@'localhost';
Delete the name 【xiaochun】 Users of ;
flush privileges;
take effect ;
create user 'xiaochun'@'%' identified by ' password ';
//'%': Create user , And give remote login
flush privileges;
take effect ;
grant all privileges on spring.* to 'xiaochun'@'%';
Give users 【xiaochun】 To the database 【spring】 All operation permissions of ;
take effect ;
flush privileges;
take effect ;
exit;
sign out
Two 、 Remote connection
Use 【mysql workbench】 land , as follows :


Verify that you have the right spring Database permissions ;

This section completes , The next chapter introduces , How to implement... In code .
reflection :grant all privileges on *.* to 'xiaochun'@'%';
Why can't you write it like this ?
边栏推荐
- Shell variables, system predefined variables $home, $pwd, $shell, $user, custom variables, special variables $n, $, $*, [email protected],
- 使用 LSM-Tree 思想基于.NET 6.0 C# 写个 KV 数据库(案例版)
- 视觉SLAM十四讲笔记(一):第一讲+第二讲
- 【英雄哥六月集训】第 24天: 线段树
- Pytorch installation (very detailed)
- Pygame: alien invasion
- Review of in vivo detection
- 01_ Movie recommendation (contentbased)_ Object portrait
- Preparation for Android interview (including the whole process of interview, interview preparation, interview questions and materials, etc.)
- Matlab-绘制日期和持续时间图
猜你喜欢

Food safety | the more you eat junk food, the more you want to eat it? Please keep this common food calorimeter

DCGAN论文改进之处+简化代码

StyleGAN论文笔记+修改代码尝试3D点云生成

FTP 服务器

Shell流程控制(重点)、if 判断、case 语句、let用法、for 循环中有for (( 初始值;循环控制条件;变量变化 ))和for 变量 in 值 1 值 2 值 3… 、while 循环

Food safety | are you still eating fermented rice noodles? Be careful these foods are poisonous!

Case of burr (bulge) notch (depression) detection of circular workpiece

Switch port mirroring Configuration Guide

PCL各模块概述(1.6)

Shell read read console input, use of read
随机推荐
Ant高级-path和fileset
Example of ICP registration for PCL
SE(Squeeze and Excitation)模块的理解以及代码实现
学习Typescript(一)
pillow的原因ImportError: cannot import name ‘PILLOW_VERSION‘ from ‘PIL‘,如何安装pillow<7.0.0
NVIDIA geforce experience login error: the verifier failed to load. Please check your browser settings, such as the advertisement interceptor (solution)
Anchor Free检测器:CenterNet
数据库性能系列之子查询
Mysql database experiment training 5, data query YGGL database query (detailed)
VS2019+CUDA11.1新建项目里没有CUDA选项
Live countdown 3 days sofachannel 29 P2P based file and image acceleration system Dragonfly
Failure of CUDA installation nsight visual studio edition failed
Ubuntu及Mysql快速入门教程
【英雄哥六月集训】第 27天: 图
语音数据采集-实时语音数据可视化
matlab-绘制分叉与混沌分支图
hugo学习笔记
线代004
There is no CUDA option in vs2019+cuda11.1 new project
sql注入