Skip to content

Instantly share code, notes, and snippets.

@thoas
Created April 29, 2009 18:08
Show Gist options
  • Save thoas/103933 to your computer and use it in GitHub Desktop.
Save thoas/103933 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
if __name__ == "__main__" :
src = "/opt/local/var/run/mysql5/mysqld.sock"
dest = "/tmp/mysql.sock"
if(not os.path.islink(dest) and not os.path.isfile(dest)):
os.link(src, "/tmp/mysql.sock")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment