[MySQL]解决mysql数据库连接报错:is not allowed to connect to this mysql server
2023-02-18 15:36:54 时间
这是因为
mysql数据库只允许自身所在的本机器连接,不允许其他机器远程连接。
如果是root用户,执行sql语句:
use mysql; select host from user where user='root';
如果是localhost ,那么就是只允许本地连接
update user set host = '%' where user ='root'; flush privileges;
这样就可以了
相关文章
- 3xx HTTP状态码的终极指南
- React报错之React.Children.only expected to receive single React element child
- React报错之Element type is invalid
- React报错之Too many re-renders
- React报错之Function components cannot have string refs
- 如何发布一个 TypeScript 编写的 npm 包
- 如何使用zx编写shell脚本
- 13个构建RESTful API的最佳实践
- 什么是REST API
- React报错之Rendered more hooks than during the previous render
- 如何使用CSS伪类选择器
- React报错之Property 'value' does not exist on type EventTarget
- React报错之Parameter 'event' implicitly has an 'any' type
- React报错之Parameter 'props' implicitly has an 'any' type
- React报错之Property 'value' does not exist on type 'HTMLElement'
- React报错之You provided a `checked` prop to a form field
- React报错之Invalid hook call
- React报错之React hook 'useState' cannot be called in a class component
- React报错之React Hook 'useEffect' is called in function
- React报错之React hook 'useState' is called conditionally