Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remotely Accessing MySQL on Mac Mini/Time Capsule

I'm currently trying to run an application on a server but my customer is very 'picky' about their data and wish to store the database on their own internal office server. I've installed MySQL and can get the application to run locally but for a few specific reasons the application needs to run else where.

I basically can't get access to MySQL from a different location. I think my main stumbling block is port forwarding to the correct location. MySQL is installed on a mac mini with local IP address 192.168.1.242 and the router/modem is an Apple Time Capsule. I've tried looking at tutorials but they all have options that I don't have access to. I've attached a screenshot of the options I have access to and the settings I've tried so far.

enter image description here enter image description here

Other information possibly needed is:

  • I need to connect from PHP
  • I've set a user up within MySQL with a wildcard (%)
  • I'm testing it using the following: command on my local machine in CMD: mysql -u username -h remote_ip_address -p
  • I get the following error: ERROR 2003 (HY000): Can't connect to MySQL server on 'REMOTE_IP_ADDRESS' (10061)
  • Firewall is turned off completely on the Mac Mini
  • There is nothing in the my.cnf file
  • OS is Sierra

That's all I can think of at the moment but any advice would be greatly appreciated and any more information required can be provided.

PS. evidently I'm not very good with MAC machines/networks

like image 741
user1530205 Avatar asked Sep 19 '17 14:09

user1530205


People also ask

How do I launch MySQL from MAC?

To launch MySQL Workbench on macOS, open the Applications folder in the Finder, then double-click MySQL Workbench.

Where MySQL database is stored in Mac?

By default, the MySQL directories are installed under /usr/local/ . Even better, add /usr/local/mysql/bin to your PATH environment variable. You can do this by modifying the appropriate startup file for your shell.

Is MySQL compatible with OSX?

MySQL for macOS is available in a number of different forms: Native Package Installer, which uses the native macOS installer (DMG) to walk you through the installation of MySQL. For more information, see Chapter 2, Installing MySQL on macOS Using Native Packages. You can use the package installer with macOS.


1 Answers

For anyone that reads this I had a very specific issue. I installed MySQL using homebrew. Homebrew binds MySQL to 127.0.0.1 therefore will only allow connections to MySQL from the same machine no matter what you try to do. To fix it I've had to edit /usr/local/Cellar/mysql//homebrew.mxcl.mysql.plist and replace --bind-address=127.0.0.1 with bind-address=*.

like image 123
user1530205 Avatar answered Oct 16 '22 14:10

user1530205