当前位置:网站首页>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 ?
边栏推荐
- Matlab- draw superimposed ladder diagram and line diagram
- 数据库操作基础语句
- Practice and exploration of overseas site Seata of ant group
- Cannot start after installing MySQL 5.7.27 in CentOS 7? (Language bash)
- 3D修复论文:Shape Inpainting using 3D Generative Adversarial Network and Recurrent Convolutional Networks
- Live countdown 3 days sofachannel 29 P2P based file and image acceleration system Dragonfly
- mount.nfs: access denied by server while mounting解决
- Matlab-绘制日期和持续时间图
- Shell的正则表达式入门、常规匹配、特殊字符:^、$、.、*、字符区间(中括号):[ ]、特殊字符:\、匹配手机号
- oracle rac 19c pdb实例当掉
猜你喜欢

Ant advanced -path and fileset

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

Ant advanced task

Live countdown 3 days sofachannel 29 P2P based file and image acceleration system Dragonfly

卸载CUDA11.1

VS2019+CUDA11.1新建项目里没有CUDA选项

Provincial Emergency Management Department: Guangzhou can strive to promote the experience of emergency safety education for children

Shell process control (emphasis), if judgment, case statement, let usage, for ((initial value; loop control condition; variable change)) and for variable in value 1 value 2 value 3..., while loop

Gbase 8A MPP cluster capacity expansion practice

Food safety | the more you eat junk food, the more you want to eat it? Please keep this common food calorimeter
随机推荐
使用 LSM-Tree 思想基于.NET 6.0 C# 写个 KV 数据库(案例版)
sql注入
Mysql database experiment training 5, data query YGGL database query (detailed)
hugo学习笔记
Sub query of database performance series
Robotframework+eclispe environment installation
【英雄哥六月集训】第 24天: 线段树
wind10配置adb命令
Pyautogui realizes automatic office -rpa small case
NFS 服务器的搭建
How does data analysis solve business problems? Here is a super detailed introduction
hdu5289(Assignment)
【精选】如何完美的写 PHP 代码的呢?
NFT system development - Tutorial
超赞的卡尔曼滤波详解文章
After one year, the paper was finally accepted by the international summit
安装CUDA失败的情况nsight visual studio edition失败
Leetcode.565. array nesting____ Violent dfs- > pruning dfs- > in situ modification
解决ORCLE-ORA-01122 01110 01210
DES/3DES/AES区别