当前位置:网站首页>Mysql8.0 method and steps for enabling remote connection permission
Mysql8.0 method and steps for enabling remote connection permission
2022-06-30 16:14:00 【1024 Q】
Problem description :
Error reason :
resolvent :
summary
Problem description :development environment :MySQL8+Centos8;
perform MySQL sentence :mysql -h 180.76.XXX.XX -u root -pPassword;
ERROR 1130 (HY000): Host ‘180.76.XXX.XX’ is not allowed to connect to this MySQL server
resolvent :First , Check whether the firewall of the server to connect to the database is closed , Check whether the connection with the server is smooth ( Method : stay cmd Console Input ping ip Address )
Next , Get to the point :
The specific operation steps are as follows :
Log in locally MySQL library , Switch to database= “mysql” Next , change “mysql” In the database “user” Exterior and interior “host” term , from "localhost" rename "%" :
Executive mysql The order is as follows :
【1】mysql Command to connect to the local server for which you want to open remote connection permission mysql library >mysql -u root -pPassWord # ”root“ For login account ,”Password“ Is the login password , Modify according to your own settings >use mysql; # The use of database The name is ”mysql“>update user set host = '%' where user = 'root'; # modify ”root“ Account configuration information # update user set host='%' where user='test'; ## If the account number is “test”, Use this command >select host, user from user; # Verification and modification succeeded ;stay mysql The specific execution result of the command line is shown in the figure below :

2. here “ If you connect to a remote MySQL, Still not connected ” when , Then continue the operation GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION; Account authorization , After performing FLUSH PRIVILEGES; refresh , that will do ." :
>mysql -u root -pPassWord # ”root“ For login account ,”Password“ Is the login password , Modify according to your own settings # Connect MySQL database >GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION; # to grant authorization # Grant all privileges on test.* to 'test'@'%'; # If the account number is “test” when , Use this command >FLUSH PRIVILEGES; # Refresh >EXIT; # sign out MySQLstay mysql The specific execution result of the command line is shown in the figure below :

remarks : Be sure to end here with a semicolon !!!
At this time, there is no above ERROR 1133 Wrong. , After testing , You can already connect to the remote server .
The general implementation steps are as follows :

reference :
Yes MySQL Methods of opening remote connection permissions
solve mysql8 Report errors :ERROR 1410 (42000): You are not allowed to create a user with GRANT
summaryThis is about MySQL8.0 This is the end of the article on enabling remote connection permissions , More about MySQL8.0 To open the remote connection permission content, please search the previous articles of the software development network or continue to browse the following related articles. I hope you can support the software development network in the future !
边栏推荐
- Is your light on? Before you start to solve a problem, you need to know what the "real problem" is
- Does flinkcdc have to be a clustered version if the monitored database is Mongo
- Interview experience of service end test engineer
- Policy Center-Permissions and APIs that Access Sensitive Information
- What role does "low code" play in enterprise digital transformation?
- '<', Hexadecimal value 0x3c, is an invalid problem solving
- 智慧风电:数字孪生 3D 风机智能设备运维
- Openresty built in variable
- 深入理解.Net中的线程同步之构造模式(二)内核模式1.内核模式构造物Event事件
- 云化XR,如何助力产业升级
猜你喜欢

【Leetcode】链表排序(逐步提高时空复杂度)

'<', hexadecimal value 0x3C, is an invalid 问题解决

'<', Hexadecimal value 0x3c, is an invalid problem solving

topic: Privacy, Deception and Device Abuse

电子烟强制性国家标准GB 41700-2022发布 2022年10月1日起实施

什么是XR扩展现实,XR云串流平台有哪些

数数据可视化实战案例(timeline轮播图,streamlit 控件年份 metabase可视化使用教程)2.0
![Warning: [antd: Menu] `children` will be removed in next major version. Please use `items` instead.](/img/c1/99ad29789a669c4498fb93ce1fb009.png)
Warning: [antd: Menu] `children` will be removed in next major version. Please use `items` instead.

互联网研发效能之去哪儿网(Qunar)核心领域DevOps落地实践

Simulate user login function
随机推荐
linux下修改mysql密码: ERROR 1396 (HY000): Operation ALTER USER failed for ‘root‘@‘localhost‘
详解Go语言中for循环,break和continue的使用
Create a new MySQL database under Linux and import SQL files
什么是XR扩展现实,XR云串流平台有哪些
互联网研发效能之去哪儿网(Qunar)核心领域DevOps落地实践
构建适合组织的云原生可观测性能力
Summary of gradient descent optimizer (rmsprop, momentum, Adam)
Reptile (1) - Introduction to basic reptile theory
ASP. Net core Middleware
topic: Privacy, Deception and Device Abuse
Finally understand science! 200 pictures to appreciate the peak of human wisdom
The inspiration from infant cognitive learning may be the key to the next generation of unsupervised machine learning
Mysql事务/锁/日志总结
“低代码”在企业数字化转型中扮演着什么角色?
ASP. Send information in sinalr controller of net core
Which direction should college students choose to find jobs after graduation?
【子矩阵数量统计】CF1181C Flag子矩阵数量统计
Simulation of two-color ball system to judge the winning situation
What is the difference between real-time rendering and pre rendering
超 Nice 的表格响应式布局小技巧