美文网首页
阿里云mysql mac Sequel Pro远程连接笔记

阿里云mysql mac Sequel Pro远程连接笔记

作者: 小黑猿 | 来源:发表于2019-01-03 12:31 被阅读0次

一、mysql授权

1、进入mysql monitor
sudo mysql -uroot -p

2、授权用户
mysql>grant all privileges on *.* to 'root'@'%' identified by 'youpassword' with grant option;

1).:第一个代表数据库名;第二个代表表名。这里的意思是所有数据库里的所有表都授权给用户。root:授予root账号。“%”:表示授权的用户IP可以指定,这里代表任意的IP地址都能访问MySQL数据库。“password”:分配账号对应的密码,这里密码自己替换成你的 mysql root帐号 密码。

2、刷新权限信息
mysql>flush privileges;

3 、重启mysql
/etc/init.d/mysql restart

二、mysql配置文件

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

注释 bind-address = 127.0.0.1
添加character_set_server=utf8

83B3DBE21FA905775341D7E971B47690.png

三、添加安全组规则

配置mysql安全组配置规则

0C328CC868D86A92CCE40E712F77EF79.png

相关文章

网友评论

      本文标题:阿里云mysql mac Sequel Pro远程连接笔记

      本文链接:https://www.haomeiwen.com/subject/hvcfrqtx.html