[MySQL]解决mysql数据库连接报错:is not allowed to connect to this mysql server
这是因为
mysql数据库只允许自身所在的本机器连接,不允许其他机器远程连接。
如果是root用户,执行sql语句:
use mysql; select host from user where user='root';
如果是localhost ,那么就是只允许本地连接
update user set host = '%' where user ='root'; flush privileges;
这样就可以了
十年开发经验程序员,离职全心创业中,历时三年开发出的产品《唯一客服系统》
一款基于Golang+Vue开发的在线客服系统,软件著作权编号:2021SR1462600。一套可私有化部署的网站在线客服系统,编译后的二进制文件可直接使用无需搭开发环境,下载zip解压即可,仅依赖MySQL数据库,是一个开箱即用的全渠道在线客服系统,致力于帮助广大开发者/公司快速部署整合私有化客服功能。
开源地址:唯一客服(开源学习版)
官网地址:唯一客服官网