navicat可以远程连接, root账号也可以用代码连接。 其他的用户无法远程连接。

 

原因: 1、先检查下 mysql数据库里面 的 servers 表是否存在。

2、更新或者创建用户之后 使用:  flush privileges;  命令看看;

 

grant all privileges on *.* to root@”xxx.xxx.xxx.xxx” identified by “密码”;

3、不存在表 则需要创建:

use mysql;
CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,
`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Password` char(64) NOT NULL,
`Port` int(4) DEFAULT NULL,
`Socket` char(64) DEFAULT NULL,
`Wrapper` char(64) NOT NULL,
`Owner` char(64) NOT NULL,
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

4、如果创建过程还提示:

则先执行drop table 命令

 

相关文章:

  • 2021-12-01
  • 2021-07-29
  • 2022-02-22
  • 2021-09-19
  • 2022-01-14
  • 2021-05-24
猜你喜欢
  • 2021-08-03
  • 2021-11-25
  • 2022-01-16
  • 2021-10-11
  • 2022-12-23
  • 2022-01-20
相关资源
相似解决方案