Denis Barushev

Email: barushev@gmail.com

Location of the MySQL Socket File in Different Systems

From #mysql_socket_location:

"/tmp/mysql.sock", # default
"/var/run/mysqld/mysqld.sock", # debian/gentoo
"/var/tmp/mysql.sock", # freebsd
"/var/lib/mysql/mysql.sock", # fedora
"/opt/local/lib/mysql/mysql.sock", # fedora
"/opt/local/var/run/mysqld/mysqld.sock", # mac + darwinports + mysql
"/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4
"/opt/local/var/run/mysql5/mysqld.sock", # mac + darwinports + mysql5
"/opt/lampp/var/mysql/mysql.sock" # xampp for linux

Install MySQL and mysql gem on Mac OS X Leopard

Install MySQL server via MacPorts:

sudo port install mysql5 +server

Setup the database:

sudo -u mysql mysql_install_db5

Configure MySQL to start up automatically when OS X boots:

sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist

Install mysql gem:

sudo gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5

Source.

Socket location: /opt/local/var/run/mysql5/mysqld.sock.

Adding Bash Completion for Git on Mac OS X Leopard

Copy this code and paste it into Terminal.

This also should work for any *NIX.

Update

There are the easiest ways to add bash completion for git.

For Mac OS X

Install git via MacPorts:

sudo port install git-core +bash_completion

Then add the following lines at the end of your ~/.profile:

if [ -f /opt/local/etc/bash_completion ]; then
    . /opt/local/etc/bash_completion
fi

For Ubuntu

sudo aptitude install git-completion

For Fedora

sudo smart install bash-completion