用Navicat Premium 连接mysql数据库时报错

报错原因:此时的MySQL默认不能远程连接。

解决方案:修改MySQL配置

具体步骤:

1、登陆服务器,进入数据库

mysql -uroot -p密码

查看数据库用户

show databases;

2、切换用户,查看配置

执行命令

use mysql;

select host from user where user='root';

看到如图所示的配置:localhost

3、修改配置

执行如下命令

update user set host = '%' where user ='root'

解释:将localhost设置为通配符%。

localhost设置了“%”后便可以允许远程访问。

4、使配置生效

localhost修改完成后执行以下命令使配置立即生效。

flush privileges;

然后在查看配置

 select host from user where user='root';

已成功修改,这个时候就可以连接了。

用Navicat Premium 连接mysql数据库时报错 -- 1130 Host xxxx is not allowed to connect to this MySQL server的更多相关文章

  1. 远程连接mysql报错【1130 -host 'localhost' is not allowed to connect to this mysql server】

    远程连接mysql时包如下错误: 1130 -host 'localhost' is not allowed to connect to this mysql server 解决办法 本地用root账 ...

  2. 连接远程数据库时出现 SSH: expected key exchange group packet from server / 2003 - Can't connect to MySQL server on 'XXX' (10038) / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

    昨天在自己的远程服务器上玩,把系统重装了.新装了MySQL,在本地用navicat连接的时候出了几个小问题. 问题一:SSH: expected key exchange group packet f ...

  3. mysql报错:1130 -host 'localhost' is not allowed to connect to this mysql server

    错误提示:1130 -host 'localhost' is not allowed to connect to this mysql server 原因:手贱把mysql数据库系统中mysql数据库 ...

  4. ERROR 1130: Host xxx is not allowed to connect to this MySQL server

    在使用MySQL-Front连接mysql的时候发生的这个错误 ERROR 1130: Host xxx is not allowed to connect to this MySQL server ...

  5. python settings :RROR 1130: Host 'XXXXXX' is not allowed to connect to this MySQL server

    pymysql.err.InternalError: (1130, u"Host '127.0.0.1' is not allowed to connect to this MySQL se ...

  6. 解决MySql报错:1130 - Host 'xxx' is not allowed to connect to this MySQL server的方法

    发现问题 使用Navicat连接MySql数据库时,未能成功,提示信息如下图: 这个错误提示已经很明确了,"不允许主机'desktop-teat9ob'连接到此mysql服务器", ...

  7. ERROR 1130: Host 'XXXXXXX' is not allowed to connect to this MySQL server

    解决方法:1. 改表法.可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 & ...

  8. 解决1130 Host 'localhost' is not allowed to connect to this MySQL server

  9. Navicat Premium连接各种数据库

    版本信息 Navicat Premium 是一套数据库开发工具,让你从单一应用程序中同时连接 MySQL.MariaDB.SQL Server.Oracle.PostgreSQL 和 SQLite 数 ...

随机推荐

  1. 106)PHP,缩略图代码和结果展示

    首先是 代码展示: <?php class CImage { /** * 生成保持原图纵横比的缩略图,支持.png .jpg .gif * 缩略图类型统一为.png格式 *@param $src ...

  2. [LC] 56. Merge Intervals

    Given a collection of intervals, merge all overlapping intervals. Example 1: Input: [[1,3],[2,6],[8, ...

  3. SSL_CTX结构体

    /* 定义在ssl.h头文件中 */struct ssl_ctx_st { SSL_METHOD *method; unsigned long options; unsigned long mode; ...

  4. ubuntu 服务器 php 环境简单搭建

    安装中文支持,避免一些语言相关的坑 12345678 sudo apt-get install language-pack-zh-hans sudo vim /etc/default/locale L ...

  5. 吴裕雄--天生自然KITTEN编程:青蛙答题过河

  6. 一下午简单写个搭建Flutter开发环境,dome跑起来!

    1.下载flutter包由于需要翻墙,国内下载会出现问题,所有需要先配置一下用户环境变量. export PUB_HOSTED_URL=https://pub.flutter-io.cn export ...

  7. Springboot整合Dubbo和Zookeeper

    Dubbo是一款由阿里巴巴开发的远程服务调用框架(RPC),其可以透明化的调用远程服务,就像调用本地服务一样简单.截至目前,Dubbo发布了基于Spring Boot构建的版本,版本号为0.2.0,这 ...

  8. API网关Kong

    官网:https://konghq.com/ 各种方式安装汇总:https://konghq.com/install/ 命令列表:https://docs.konghq.com/0.14.x/admi ...

  9. [PyTorch入门之60分钟入门闪击战]之训练分类器

    训练分类器 目前为止,你已经知道如何定义神经网络.计算损失和更新网络的权重.现在你可能在想,那数据呢? What about data? 通常,当你需要处理图像.文本.音频或者视频数据时,你可以使用标 ...

  10. stat()函数--------------获取文件信息

    stat():用于获取文件的状态信息,使用时需要包含<sys/stat.h>头文件. 函数原型:int stat(const char *path, struct stat *buf): ...