Changeset 2736
- Timestamp:
- 04/23/06 17:18:53 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/magic-removal/django/db/backends/mysql/base.py
r2735 r2736 76 76 'db': settings.DATABASE_NAME, 77 77 'passwd': settings.DATABASE_PASSWORD, 78 'host': settings.DATABASE_HOST,79 78 'conv': django_conversions, 80 79 } 80 if settings.DATABASE_HOST.startswith('/'): 81 kwargs['unix_socket'] = settings.DATABASE_HOST 82 else: 83 kwargs['host'] = settings.DATABASE_HOST 81 84 if settings.DATABASE_PORT: 82 85 kwargs['port'] = int(settings.DATABASE_PORT) django/branches/magic-removal/docs/settings.txt
r2714 r2736 239 239 Which host to use when connecting to the database. An empty string means 240 240 localhost. Not used with SQLite. 241 242 If this value starts with a forward slash (``'/'``) and you're using MySQL, 243 MySQL will connect via a Unix socket to the specified socket. For example:: 244 245 DATABASE_HOST = '/var/run/mysql' 246 247 If you're using MySQL and this value *doesn't* start with a forward slash, then 248 this value is assumed to be the host. 241 249 242 250 DATABASE_NAME
