把你的ubuntu里的mysql设置为允许远程链接
允许本机ip用root用户来访问test4下面的所有的表使用的密码是123456: grant all privileges on test4.* to 'root'@'ip' identified by '123456' with grant option;
让授权生效:
flush privileges;
链接ubuntu数据库
右击mac上的数据库选择数据传输
填写数据点击开始
效果图