Navicat连接阿里云Ubuntu的mysql

来源:互联网 发布:手机自动充电软件 编辑:程序博客网 时间:2024/04/29 15:31

1、设置软件源

http://blog.csdn.net/ezreal_king/article/details/72790291

2、安装mysql

http://blog.csdn.net/u014520797/article/details/53366719

3、mysql授权
(1)授权

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; Query OK, 0 rows affected, 1 warning (0.00 sec)mysql> FLUSH PRIVILEGES;Query OK, 0 rows affected (0.00 sec)说明:【想要root用户使用密码123456从任何主机连接到mysql服务器】

(2)查看授权结果

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select host,user from user;
+———–+——————+
| host | user |
+———–+——————+
| % | root |
| localhost | debian-sys-maint |
| localhost | mysql.session |
| localhost | mysql.sys |
| localhost | root |
+———–+——————+
5 rows in set (0.00 sec)

mysql> exit

4、修改配置文件

vim /etc/mysql/mysql.conf.d/mysqld.cnf

修改如下
这里写图片描述
然后重启mysql

service mysql restart

5、阿里云服务器控制台开放Ubuntu防火墙3306端口
这里写图片描述

这里写图片描述

这里写图片描述

这里写图片描述

这样就可以通过Navicat连接到阿里云服务器里的mysql了

阅读全文
0 0
原创粉丝点击