I have installed mysql on mac os sierra using the instructions given here
https://gist.github.com/nrollr/a8d156206fa1e53c6cd6
after the installation.
1 I disabled the mac firewall.
2 I did the following:
mysqladmin -v -uroot -pXXXX
mysql -uroot -p
create user 'foo'@'%' identify by 'YYYYY';
flush privileges;
3 restarted mysql service
I can very easily connect to mysql using user foo locally. but when i try to connect remotely. I get the error
ERROR 2003 (HY000): Can't connect to MySQL server on '15.20.95.200' (61)
Searched the internet and there are a million answers to this problem which have been solved by messing around with my.cnf
. But on mac OS Sierra. there is no my.cnf file.
I do have a file
/usr/local/Cellar/mysql/5.7.18_1/support-files/mysql.server
I copied this file to /etc/my.cnf
and added line
[mysqld]
bind-address=0.0.0.0
restarted mysql brew services restart mysql
but still i get the same problem.
Edit:: My IP address is not wrong. I can ping the machine remotely. I can use the remote desktop and connect to the machine running mysql using the Same IP address. in fact right now I am connected to the machine using remote desktop and working on mysql locally. using the same login id foo.
its just the mysql command line fails.