MySQL连接服务器 报错2013....

2022-10-01 09:27:37

MySQL连接服务器

  1. 连接报错:

    2013- Lost connection to MySQL server at ‘waiting for initial communication packet’, system error.0 “Internal error/check(Not system error)”

解决方法:

vim /etc/my.cnf

在此处加入skip-name-resolve 跳过DNS反向解析过程.(这样就不能使用主机名连接mysql了,只能使用ip连接)

image-20211120201203378

2.查看数据库信息报错

1227 - Access denied; you need (at least one of) the RELOAD privilege(s) for this operation

image-20211120201429967

#给当前用赋值PROCESS的权限
grant process on *.* to 用户名;
#刷新权限
flush privileges;

3.连接之后没有报错,但是查看不了数据库.

image-20211120212017637

解决办法:

把这个勾上

image-20211120212138111

成功

image-20211120212206224

个人博客:https://xiaozaiyi.xyz/

  • 作者:Crazy_August
  • 原文链接:https://blog.csdn.net/weixin_45454773/article/details/121708482
    更新时间:2022-10-01 09:27:37