navicet for mysql 远程数据库连接
参考连接:https://blog.csdn.net/weixin_44198965/article/details/91877208
https://blog.csdn.net/loveer0/article/details/82389781
赋予权限
进入navicet for mysql 选择想要连接的数据库----》右键选择’命令列界面"如下图
在右方输入参考连接的代码开启权限
mysql>GRANT ALL PRIVILEGES ON 数据库名.* TO xxxx@"%" IDENTIFIED BY "密码";//指定数据库能访问
或者
mysql>grant all privileges on *.* to username@'%' identified by 'password'; //所有数据库都能访问
此处我的用户名为root
接着 刷新使它生效
mysql>FLUSH PRIVILEGES
开始连接
新建连接----》输入连接名 IP地址,用户名和密码
测试成功说明可以连接–》确认,然后在窗口就会刷新,连接就出现在窗口了
关闭授权
revoke all on *.* from dba@localhost;