In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the solution of remote connection to mysql database without permission, which is very detailed and has certain reference value. Friends who are interested must finish reading it.
The solution to remote connection to the mysql database without permission: first log in to the data by executing the [mysql-uroot p password] statement under the bin directory of mysql, and then execute use mysql with the code [select host,user,password from user].
The solution to remote connection to the mysql database without permissions:
Problem description:
In the locally installed mysql database, there is no problem with writing localhost in the code, and the startup is normal. However, change the database address in the url of the database connection to the local IP address, and report an error when starting the project:
Cause:java.sql.SQLException: null, message from server: "Host 'LAPTOP-OKH5Q67F' is not allowed to connect to this MySQL server"
It means that the server where the database is installed does not allow the server that deployed the project to connect remotely. That is, the question of permissions, just modify the permissions, the modification method is.
The log is shown in the figure:
Solution:
Execute under the bin directory of mysql: mysql-uroot-p password to log in to the data:
Execute use mysql
Select host,user,password from user
You can see that if user is root,host and localhost, it means that mysql only allows local connections, then the public network and local software clients cannot connect.
Adjustment method:
Execute: update user set host='%' where user = 'root'
Perform refresh permission: flush privileges
You can test the external network connection to the mysql server.
The above is all the contents of the solution of remote connection to mysql database without permission, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.