Navicat连接MySQL数据库
Sonder
2019-12-09
760字
2分钟
浏览 (3.9k)
一、首先要mysql授权
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
mysql>FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
说明:【想要root用户使用密码123456从任何主机连接到mysql服务器】
mysql> select host,user from user;
+-------------------------+------+
| host | user |
+-------------------------+------+
| % | root |
| 127.0.0.1 | root |
| iz2ze3hkpeilimy9kn68tvz | |
| iz2ze3hkpeilimy9kn68tvz | root |
| localhost | |
| localhost | root |
+-------------------------+------+
6 rows in set (0.00 sec)
说明:【修改权限后查询user表】
二、Navicat远程连接阿里云ECS数据库
1、首先常规设置
2、进行SSH设置
SSH密码就是你连接服务器密码