报错localhost is not allowed to connect
来源:互联网 发布:零用钱大作战mac 编辑:程序博客网 时间:2024/05/18 03:20
用navicat工具连接mysql的时候报错localhost is not allowed to connect
百度到有两个解决方法:改表法与授权法,但是我试过都不行,只要在my.ini文件里删除skip-grant-tables 就又连接不上了。
无数种尝试之后,我发现把这两个方法结合起来用好像可以。
方法如下:
1.在mysql安装目录下的 my.ini 文件中的 [mysqld] 标签里加上 skip-grant-tables 跳过权限表
2.重启mysql服务,这时可以连接上
3.改表
mysql>use mysql;mysql>update user set host = '%' where user = 'root';mysql>select host, user from user;
4.授权
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;在网上看到这一句的意思是允许用户在任何地方可连接,password记得修改成root的密码
5.删除my.ini里的skip-grant-tables,重启mysql,就可以连接上了
阅读全文
0 0
- 报错localhost is not allowed to connect
- mysql报错:1130 -host 'localhost' is not allowed to connect to this mysql server
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 基于大数据技术的全国高速公路通行数据 动态监测平台建设
- JAVA8 lambda 微解
- 操作CSV文件例子,并且加上文字处理:统计相同功能的问题单(报告画图用)
- tensorflow和caffe共存问题
- 16进制转为10进制
- 报错localhost is not allowed to connect
- faster-rcnn在win10+cuda8.0+1080ti+vs2013+matlab2015b下的配置 疑难问题解答
- mysql中jdbcType的匹配
- html5 progress标签的使用
- 对几种开源的TCP/IP协议栈分析
- EventTrigger接管所有事件导致其他事件无法触发
- IDA Create Unicode String(English)
- Python里 模块、Package概念
- JMAG.DESIGNER.16.0.WIN.LINUX.X64 马达电磁分析