远程连接到OSX机器上安装的mysql

时间:2015-09-01 18:13:03

标签: mysql macos remote-access

我现在在网上搜索了2个小时,试图从我的MacBook连接到使用iMac上的brew安装的mysql。

我可以在mysql上从iMac本地登录:

来自iMac终端:

mac-server:5.6.26 mhewedy$ ifconfig | grep netmask
inet 127.0.0.1 netmask 0xff000000 
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255

MySQL的:

mysql> show grants for 'root';
+--------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@%                                                                                                              |
+--------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD '....' WITH GRANT OPTION

my.cnf档案

cat /usr/local/Cellar/mysql/5.6.26/my.cnf 
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

[mysqld]

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = .....

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

bind-address        = 0.0.0.0
# skip-networking

我正在尝试从macbookWorkbench连接macbook:

enter image description here

0 个答案:

没有答案