I wrote this while working for SIUC Student Center Marketing & Graphics. This is by no means comprehensive documentation. It's not meant to be. I wrote this so that I could remember what I did from day to day. DO NOT follow this to the letter. It will not work and it will leave your system open to attack. Use this documentation as a guide and possibly idea generator, nothing else. It's not my fault if you blow up your system.
- Find your my.cnf
[ws242014:~] root# ls /usr/local/mysql/data/my.cnf /usr/local/mysql/data/my.cnf [ws242014:~] root#
- If you don't have one, check out the examples
[ws242014:~] root# ls /usr/local/mysql/support-files/ magic my-large.cnf my-small.cnf mysql-log-rotate mysql.spec my-huge.cnf my-medium.cnf mysql-3.23.51.spec mysql.server [ws242014:~] root#
- You can elegantly start MySQL as follows
[ws242014:~] root# /Library/StartupItems/MySQL/MySQL Starting MySQL database server [ws242014:~] root# Starting mysqld daemon with databases from /usr/local/mysql-3.23.51/data 242014:~] root#
- You can elegantly kill MySQL as follows
[ws242014:~] root# mysqladmin -p shutdown Enter password: [ws242014:~] root#
The password you need here is your MySQL root password, not your root login password.
- You need to punch a hole in your firewall to let connections in on port 3306
[ws242014:~] root# vi /etc/firewall.conf
Add an entry towards the bottom that looks something like this:
(as far as i can figure, the 2034 here is just a sequential number. look at the file and figure out what it should be for you.)################################################# ## MySQL ################################################# add 2034 allow tcp from any to 127.0.0.1 3306 in via en0 add 2034 allow tcp from 127.0.0.1 3306 to any out via en0
Instead of using 127.0.0.1, use your real external ip address. You can probably find this with ifconfig. It should be snip1.[ws242014:~] root# ifconfig en0 en0: flags=8863<UP,BROADCAST,b6,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet [-snip1-] netmask 0xffffff80 broadcast [-snip2-] ether [-snip3-] media: autoselect (10baseT/UTP <half-duplex>) status: active supported media: none autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <half-duplex,hw-loopback> 10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,hw-loopback> 100baseTX <half-duplex> 100baseTX <half-duplex,hw-loopback> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback> [ws242014:~] root#
- After writing the hole into the firewall.conf, you need to rerun the firewall script.
[ws242014:~] root# /Library/StartupItems/Firewall/Firewall [ws242014:~] root#
- Restart MySQL as explained above (just for good measure)
- Try to connect from a remote client. If it hangs, you did something wrong. If it tells you that you don't have access, you at least got through the OS X firewall. Check out your permissions tables in MySQL. This is beyond the scope of this document.
References:
http://www.mysql.com/documentation/mysql/bychapter/index.htmlLast updated: Sunday, 20-Sep-2009 16:55:49 CDT
Contact me at randall dot will at gmail dot com
Hobbies
Vintage MotorcyclesNetworking
FacebookPresence
UbuntuDiscount ASP.NET
CPAN
p2p Wrox
Roundcube
Freshmeat
Blogger
uShip
Psychology Software Tools
Virtual Corvair Club
Chopper Charles
Live Journal
Thoughts
Borrowed PhilosophyHistorical Histrionics
Current Histrionics
Old Projects
Motorola V400 / LinuxHP ZE4200 / Linux
VPR Matrix 220a5 / Linux
FreeRadius Accounting / Linux
LDAP / FreeRadius Auth / Linux
Remote MySQL / OSX
Stewie Radio Automation
Wireless Wandering Done Right
DynDNS: TinyDNS / OpenSSH
Xilinx WebPACK 6.3 / Wine
Xilinx WebPACK 7.1 / Debian
Apache 301 Redirection
Using Your Debian Cache
Google AdSense
Gnome AdSense Monitor
Pixlatch Gallery Generator
C#.NET Tips & Tricks
Ubuntu Breezy Clockmod Bug
